Files
chat/venv/lib/python3.12/site-packages/mypyc/lib-rt/set_ops.c
Andrew K. Choi ddce9f5125
All checks were successful
continuous-integration/drone/push Build is passing
Major fixes and new features
2025-09-25 15:51:48 +09:00

18 lines
351 B
C

// 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;
}