Message308894
I was hoping for something simple - as in:
+1 #define PY_SSIZE_T_CLEAN
+2
+3 #include "Python.h"
+4 #ifndef _AIX
+5 #include <uuid/uuid.h>
+6 #else
+7 #include <uuid.h>
+8 #endif
However, it dies - instantly.
11 | static PyObject *
12 | py_uuid_generate_time_safe(void)
13 | {
14 | #ifdef HAVE_UUID_GENERATE_TIME_SAFE
15 | uuid_t out;
16 | int res;
17 |
18 | res = uuid_generate_time_safe(out);
19 | return Py_BuildValue("y#i", (const char *) out, sizeof(out), res);
20 | #else
21 | uuid_t out;
22 | uuid_generate_time(out);
23 | return Py_BuildValue("y#O", (const char *) out, sizeof(out), Py_None);
23 + return _Py_BuildValue_SizeT("y#O", (const char *) out, sizeof(out), (&_Py_NoneStruct));
"/data/prj/python/git/python3-3.7.0.a3/Modules/_uuidmodule.c", line 23.48: 1506-117 (S) Operand must be a scalar type.
24 | #endif
25 | }
26 |
On a linux system I see:
typedef unsigned char uuid_t[16];
while on AIX the typedef is:
/*
* Universal Unique Identifier (UUID) types.
*/
typedef struct _uuid_t
{
unsigned32 time_low;
unsigned16 time_mid;
unsigned16 time_hi_and_version;
unsigned8 clock_seq_hi_and_reserved;
unsigned8 clock_seq_low;
byte node[6];
} uuid_t, *uuid_p_t;
So, mentioning this for now - as I do not yet know the module. If someone with intimate knowledge of the current implementation is willing to help me - I'll dabble and learn - and see if we can make it work on AIX as well.
p.s. - guessing on the "Extension Modules" label. If not the right choice, please update. |
|
Date |
User |
Action |
Args |
2017-12-21 18:49:07 | Michael.Felt | set | recipients:
+ Michael.Felt |
2017-12-21 18:49:07 | Michael.Felt | set | messageid: <1513882147.82.0.213398074469.issue32399@psf.upfronthosting.co.za> |
2017-12-21 18:49:07 | Michael.Felt | link | issue32399 messages |
2017-12-21 18:49:07 | Michael.Felt | create | |
|