Functions that deal with converting between C and Python primatives. More...
Functions | |
| REPY_Handle | REPY_CreateBool (REPY_bool value) |
| Returns a REPY_Handle for a Python bool object, based on a C bool. | |
| REPY_Handle | REPY_CreateBool_SUH (REPY_bool value) |
| Returns a Single-Use REPY_Handle for a Python bool object, based on a C bool. | |
| REPY_bool | REPY_CastBool (REPY_Handle object) |
| Casts a Python object to a C bool. | |
| REPY_Handle | REPY_CreateU8 (REPY_u8 value) |
| Returns a REPY_Handle for a Python int object, based on a C u8. | |
| REPY_Handle | REPY_CreateU8_SUH (REPY_u8 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C u8. | |
| REPY_u8 | REPY_CastU8 (REPY_Handle object) |
| Casts a Python object to a C u8. | |
| REPY_Handle | REPY_CreateS8 (REPY_s8 value) |
| Returns a REPY_Handle for a Python int object, based on a C s8. | |
| REPY_Handle | REPY_CreateS8_SUH (REPY_s8 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C s8. | |
| REPY_s8 | REPY_CastS8 (REPY_Handle object) |
| Casts a Python object to a C s8. | |
| REPY_Handle | REPY_CreateU16 (REPY_u16 value) |
| Returns a REPY_Handle for a Python int object, based on a C u16. | |
| REPY_Handle | REPY_CreateU16_SUH (REPY_u16 value) |
| Returns a Single-Use REPY_Handle for a Python u16 object, based on a C int. | |
| REPY_u16 | REPY_CastU16 (REPY_Handle object) |
| Casts a Python object to a C u16. | |
| REPY_Handle | REPY_CreateS16 (REPY_s16 value) |
| Returns a REPY_Handle for a Python int object, based on a C s16. | |
| REPY_Handle | REPY_CreateS16_SUH (REPY_s16 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C s16. | |
| REPY_s16 | REPY_CastS16 (REPY_Handle object) |
| Casts a Python object to a C s16. | |
| REPY_Handle | REPY_CreateU32 (REPY_u32 value) |
| Returns a REPY_Handle for a Python int object, based on a C u32. | |
| REPY_Handle | REPY_CreateU32_SUH (REPY_u32 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C u32. | |
| REPY_u32 | REPY_CastU32 (REPY_Handle object) |
| Casts a Python object to a C u32. | |
| REPY_Handle | REPY_CreateS32 (REPY_s32 value) |
| Returns a REPY_Handle for a Python int object, based on a C s32. | |
| REPY_Handle | REPY_CreateS32_SUH (REPY_s32 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C s32. | |
| REPY_s32 | REPY_CastS32 (REPY_Handle object) |
| Casts a Python object to a C s32. | |
| REPY_Handle | REPY_CreateF32 (REPY_f32 value) |
| Returns a REPY_Handle for a Python float object, based on a C f32. | |
| REPY_Handle | REPY_CreateF32_SUH (REPY_f32 value) |
| Returns a Single-Use REPY_Handle for a Python float object, based on a C f32. | |
| REPY_f32 | REPY_CastF32 (REPY_Handle object) |
| Casts a Python object to a C f32. | |
| REPY_Handle | REPY_CreatePtr (void *value) |
| Returns a REPY_Handle for a Python int object, based on a C void*. | |
| REPY_Handle | REPY_CreatePtr_SUH (void *value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C void*. | |
| void * | REPY_CastPtr (REPY_Handle object) |
| Casts a Python object to a C void*. | |
| REPY_Handle | REPY_CreateU64 (REPY_u64 value) |
| Returns a REPY_Handle for a Python int object, based on a C u64. | |
| REPY_Handle | REPY_CreateU64_SUH (REPY_u64 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C u64. | |
| REPY_u64 | REPY_CastU64 (REPY_Handle object) |
| Casts a Python object to a C u64. | |
| REPY_Handle | REPY_CreateS64 (REPY_s64 value) |
| Returns a REPY_Handle for a Python int object, based on a C s64. | |
| REPY_Handle | REPY_CreateS64_SUH (REPY_s64 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C s64. | |
| REPY_s64 | REPY_CastS64 (REPY_Handle object) |
| Casts a Python object to a C s64. | |
| REPY_Handle | REPY_CreateF64 (REPY_f64 value) |
| Returns a REPY_Handle for a Python int object, based on a C u8. | |
| REPY_Handle | REPY_CreateF64_SUH (REPY_f64 value) |
| Returns a Single-Use REPY_Handle for a Python int object, based on a C bool. | |
| REPY_f64 | REPY_CastF64 (REPY_Handle object) |
| Casts a Python object to a C u8. | |
| REPY_Handle | REPY_CreateStr (const char *string) |
| Returns a REPY_Handle for a Python str object, based on a NULL-terminated C string. | |
| REPY_Handle | REPY_CreateStr_SUH (const char *string) |
| Returns a Single-Use REPY_Handle for a Python str object, based on a NULL-terminated C string. | |
| REPY_Handle | REPY_CreateStrN (const char *string, REPY_u32 len) |
| Returns a REPY_Handle for a Python str object, based on char array. | |
| REPY_Handle | REPY_CreateStrN_SUH (const char *string, REPY_u32 len) |
| Returns a Single-Use REPY_Handle for a Python str object, based on char array. | |
| char * | REPY_CastStr (REPY_Handle object) |
| Casts a Python object to NULL-terminated C string. Intended to be used with a Python str. | |
| REPY_Handle | REPY_CreateByteStr (const char *string) |
| Returns a REPY_Handle for a Python bytes object, based on a NULL-terminated C string. | |
| REPY_Handle | REPY_CreateByteStr_SUH (const char *string) |
| Returns a Single-Use REPY_Handle for a Python bytes object, based on a NULL-terminated C string. | |
| REPY_Handle | REPY_CreateByteStrN (const char *string, REPY_u32 len) |
| Returns a REPY_Handle for a Python bytes object, based on a char array. | |
| REPY_Handle | REPY_CreateByteStrN_SUH (const char *string, REPY_u32 len) |
| Returns a Single-Use REPY_Handle for a Python bytes object, based on a char array. | |
| char * | REPY_CastByteStr (REPY_Handle object) |
| Casts a Python object to a NULL-terminated C string. Intended to be used with a Python bytes. | |
Functions that deal with converting between C and Python primatives.
| REPY_bool REPY_CastBool | ( | REPY_Handle | object | ) |
Casts a Python object to a C bool.
Intended to be used with a Python bool. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| char * REPY_CastByteStr | ( | REPY_Handle | object | ) |
Casts a Python object to a NULL-terminated C string. Intended to be used with a Python bytes.
Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_f32 REPY_CastF32 | ( | REPY_Handle | object | ) |
Casts a Python object to a C f32.
Intended to be used with a Python float. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_f64 REPY_CastF64 | ( | REPY_Handle | object | ) |
Casts a Python object to a C u8.
Intended to be used with a Python float. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| void * REPY_CastPtr | ( | REPY_Handle | object | ) |
Casts a Python object to a C void*.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_s16 REPY_CastS16 | ( | REPY_Handle | object | ) |
Casts a Python object to a C s16.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_s32 REPY_CastS32 | ( | REPY_Handle | object | ) |
Casts a Python object to a C s32.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_s64 REPY_CastS64 | ( | REPY_Handle | object | ) |
Casts a Python object to a C s64.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_s8 REPY_CastS8 | ( | REPY_Handle | object | ) |
Casts a Python object to a C s8.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| char * REPY_CastStr | ( | REPY_Handle | object | ) |
Casts a Python object to NULL-terminated C string. Intended to be used with a Python str.
Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_u16 REPY_CastU16 | ( | REPY_Handle | object | ) |
Casts a Python object to a C u16.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_u32 REPY_CastU32 | ( | REPY_Handle | object | ) |
Casts a Python object to a C u32.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_u64 REPY_CastU64 | ( | REPY_Handle | object | ) |
Casts a Python object to a C u64.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_u8 REPY_CastU8 | ( | REPY_Handle | object | ) |
Casts a Python object to a C u8.
Intended to be used with a Python int. Behavior with other Python types may change between versions.
| object | The handle for the Python object in question. |
| REPY_Handle REPY_CreateBool | ( | REPY_bool | value | ) |
Returns a REPY_Handle for a Python bool object, based on a C bool.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Even though both Python's True and False objects are immortal objects, will still take up space in the handle management system. Ergo, failure to release this handle will result in a memory leak.
| value | The value for the Python bool. |
| REPY_Handle REPY_CreateBool_SUH | ( | REPY_bool | value | ) |
Returns a Single-Use REPY_Handle for a Python bool object, based on a C bool.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateBool(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python bool. |
| REPY_Handle REPY_CreateByteStr | ( | const char * | string | ) |
Returns a REPY_Handle for a Python bytes object, based on a NULL-terminated C string.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| string | The value for the Python bytes. |
| REPY_Handle REPY_CreateByteStr_SUH | ( | const char * | string | ) |
Returns a Single-Use REPY_Handle for a Python bytes object, based on a NULL-terminated C string.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateByteStr(string)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| string | The value for the Python bytes. |
| REPY_Handle REPY_CreateByteStrN | ( | const char * | string, |
| REPY_u32 | len ) |
Returns a REPY_Handle for a Python bytes object, based on a char array.
This function will stop reading from string if it encounters a NULL-terminator. If you need to copy a region of memory regardless of it's contents, use REPY_MemcpyToBytes.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| string | The beginning of the char array to create a Python bytes from. |
| len | The maximum length of the string array. |
| REPY_Handle REPY_CreateByteStrN_SUH | ( | const char * | string, |
| REPY_u32 | len ) |
Returns a Single-Use REPY_Handle for a Python bytes object, based on a char array.
This function will stop reading from string if it encounters a NULL-terminator. If you need to copy a region of memory regardless of it's contents, use REPY_MemcpyToBytes.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateByteStrN(string)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| string | The beginning of the char array to create a Python bytes from. |
| len | The length of the string array. |
| REPY_Handle REPY_CreateF32 | ( | REPY_f32 | value | ) |
Returns a REPY_Handle for a Python float object, based on a C f32.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python float. |
| REPY_Handle REPY_CreateF32_SUH | ( | REPY_f32 | value | ) |
Returns a Single-Use REPY_Handle for a Python float object, based on a C f32.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateBool(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python float. |
| REPY_Handle REPY_CreateF64 | ( | REPY_f64 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C u8.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateF64_SUH | ( | REPY_f64 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C bool.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateBool(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreatePtr | ( | void * | value | ) |
Returns a REPY_Handle for a Python int object, based on a C void*.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreatePtr_SUH | ( | void * | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C void*.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreatePtr(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS16 | ( | REPY_s16 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C s16.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS16_SUH | ( | REPY_s16 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C s16.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateS16(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS32 | ( | REPY_s32 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C s32.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS32_SUH | ( | REPY_s32 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C s32.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateS32(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS64 | ( | REPY_s64 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C s64.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS64_SUH | ( | REPY_s64 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C s64.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateS64(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS8 | ( | REPY_s8 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C s8.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateS8_SUH | ( | REPY_s8 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C s8.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateS8(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateStr | ( | const char * | string | ) |
Returns a REPY_Handle for a Python str object, based on a NULL-terminated C string.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| string | The value for the Python str. |
| REPY_Handle REPY_CreateStr_SUH | ( | const char * | string | ) |
Returns a Single-Use REPY_Handle for a Python str object, based on a NULL-terminated C string.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateStr(string)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| string | The value for the Python str. |
| REPY_Handle REPY_CreateStrN | ( | const char * | string, |
| REPY_u32 | len ) |
Returns a REPY_Handle for a Python str object, based on char array.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| string | The beginning of the char array to create a Python str from. |
| len | The length of the string array. |
| REPY_Handle REPY_CreateStrN_SUH | ( | const char * | string, |
| REPY_u32 | len ) |
Returns a Single-Use REPY_Handle for a Python str object, based on char array.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateStrN_SUH(string, len)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| string | The beginning of the char array to create a Python str from. |
| len | The length of the string array. |
| REPY_Handle REPY_CreateU16 | ( | REPY_u16 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C u16.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU16_SUH | ( | REPY_u16 | value | ) |
Returns a Single-Use REPY_Handle for a Python u16 object, based on a C int.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateU16(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU32 | ( | REPY_u32 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C u32.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU32_SUH | ( | REPY_u32 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C u32.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateU32(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU64 | ( | REPY_u64 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C u64.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU64_SUH | ( | REPY_u64 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C u64.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateU64(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU8 | ( | REPY_u8 | value | ) |
Returns a REPY_Handle for a Python int object, based on a C u8.
The handle returned by this function will need to be released, either by making is Single-Use or by calling REPY_Release. Failure to release this handle will result in a memory leak.
| value | The value for the Python int. |
| REPY_Handle REPY_CreateU8_SUH | ( | REPY_u8 | value | ) |
Returns a Single-Use REPY_Handle for a Python int object, based on a C u8.
At this time, this function is just shorthand for REPY_MakeSUH(REPY_CreateU8(value)), and thus will perform similarly. However, internal performance improvements may make this function more performant in the future.
| value | The value for the Python int. |