Functions related to accessing the members and propertied of objects. More...
Functions | |
| REPY_u32 | REPY_Len (REPY_Handle object) |
| Gets the length of an appropriate Python object as a u32. | |
| REPY_Handle | REPY_GetAttr (REPY_Handle object, REPY_Handle key, REPY_Handle default_value_nullable) |
| Returns a REPY_Handle for a named attribute of a Python object, using a REPY_Handle for the attribute name. | |
| REPY_Handle | REPY_GetAttrCStr (REPY_Handle object, char *key, REPY_Handle default_value_nullable) |
| Returns a REPY_Handle for a named attribute of a Python object, using a NULL-terminated C string for the name. | |
| void | REPY_SetAttr (REPY_Handle object, REPY_Handle key, REPY_Handle value) |
| Assigned a named attribute of a Python object, using a REPY_Handle for the attribute name. | |
| void | REPY_SetAttrCStr (REPY_Handle object, char *key, REPY_Handle value) |
| Assigned a named attribute of a Python object, using a NULL-terminated C string for the name. | |
| REPY_bool | REPY_HasAttr (REPY_Handle object, REPY_Handle key) |
| Checks if a Python object has an attribute with a specific name, using a REPY_Handle for the attribute name. | |
| REPY_bool | REPY_HasAttrCStr (REPY_Handle object, char *key) |
| Checks if a Python object has an attribute with a specific name, using a NULL-terminated C string for the name. | |
| void | REPY_DelAttr (REPY_Handle object, REPY_Handle key) |
| Deletes an attribute from a Python object by name, using a REPY_Handle for the attribute name. | |
| void | REPY_DelAttrCStr (REPY_Handle object, char *key) |
| Deletes an attribute from a Python object by name, using a NULL-terminated C string for the name. | |
Functions related to accessing the members and propertied of objects.
| void REPY_DelAttr | ( | REPY_Handle | object, |
| REPY_Handle | key ) |
Deletes an attribute from a Python object by name, using a REPY_Handle for the attribute name.
This function is analogous to Python's own delattr, and should work all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute to delete. The Python object referenced should generally be a str, as is standard with delattr. |
| void REPY_DelAttrCStr | ( | REPY_Handle | object, |
| char * | key ) |
Deletes an attribute from a Python object by name, using a NULL-terminated C string for the name.
This function is analogous to Python's own delattr, and should work all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute to delete. Should be a NULL-terminated C string. Will be REPY_NO_HANDLE if an error occured. |
| REPY_Handle REPY_GetAttr | ( | REPY_Handle | object, |
| REPY_Handle | key, | ||
| REPY_Handle | default_value_nullable ) |
Returns a REPY_Handle for a named attribute of a Python object, using a REPY_Handle for the attribute name.
This function is analogous to Python's own getattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute you're trying to access. The Python object referenced should generally be a str, as is standard with getattr. |
| default_value_nullable | A default Python object to return if the attribute isn't found. Use REPY_NO_OBJECT to ignore this argument. Note that if this default object is returned, the return value will be a new handle to the same object. |
| REPY_Handle REPY_GetAttrCStr | ( | REPY_Handle | object, |
| char * | key, | ||
| REPY_Handle | default_value_nullable ) |
Returns a REPY_Handle for a named attribute of a Python object, using a NULL-terminated C string for the name.
This function is analogous to Python's own getattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute you're trying to access. Should be a NULL-terminated C string. |
| default_value_nullable | A default Python object to return if the attribute isn't found. Use REPY_NO_OBJECT to ignore this argument. Note that if this default object is returned, the return value will be a new handle to the same object. |
| REPY_bool REPY_HasAttr | ( | REPY_Handle | object, |
| REPY_Handle | key ) |
Checks if a Python object has an attribute with a specific name, using a REPY_Handle for the attribute name.
This function is analogous to Python's own hasattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute to check. The Python object referenced should generally be a str, as is standard with hasattr. |
| REPY_bool REPY_HasAttrCStr | ( | REPY_Handle | object, |
| char * | key ) |
Checks if a Python object has an attribute with a specific name, using a NULL-terminated C string for the name.
This function is analogous to Python's own hasattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute to check. Should be a NULL-terminated C string. |
| REPY_u32 REPY_Len | ( | REPY_Handle | object | ) |
Gets the length of an appropriate Python object as a u32.
This function is analogous to Python's own len function, and should work in all the same circumstances.
| object | The Python object to get the length of. |
| void REPY_SetAttr | ( | REPY_Handle | object, |
| REPY_Handle | key, | ||
| REPY_Handle | value ) |
Assigned a named attribute of a Python object, using a REPY_Handle for the attribute name.
This function is analogous to Python's own setattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute you're trying to assign to. The Python object referenced should generally be a str, as is standard with setattr. |
| value | The Python object to assign to the attribute. |
| void REPY_SetAttrCStr | ( | REPY_Handle | object, |
| char * | key, | ||
| REPY_Handle | value ) |
Assigned a named attribute of a Python object, using a NULL-terminated C string for the name.
This function is analogous to Python's own setattr function, and should work in all the same circumstances.
| object | The parent Python object. |
| key | The name of attribute you're trying to assign to. The Python object referenced should generally be a str, as is standard with setattr. |
| value | The Python object to assign to the attribute. |