init
This commit is contained in:
commit
38355d2442
9083 changed files with 1225834 additions and 0 deletions
17
.venv/lib/python3.8/site-packages/mypyc/lib-rt/set_ops.c
Normal file
17
.venv/lib/python3.8/site-packages/mypyc/lib-rt/set_ops.c
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Set primitive operations
|
||||
//
|
||||
// These are registered in mypyc.primitives.set_ops.
|
||||
|
||||
#include <Python.h>
|
||||
#include "CPy.h"
|
||||
|
||||
bool CPySet_Remove(PyObject *set, PyObject *key) {
|
||||
int success = PySet_Discard(set, key);
|
||||
if (success == 1) {
|
||||
return true;
|
||||
}
|
||||
if (success == 0) {
|
||||
_PyErr_SetKeyError(key);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue