This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Michael.Felt
Recipients Michael.Felt
Date 2017-12-21.18:49:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513882147.82.0.213398074469.issue32399@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-21 18:49:07Michael.Feltsetrecipients: + Michael.Felt
2017-12-21 18:49:07Michael.Feltsetmessageid: <1513882147.82.0.213398074469.issue32399@psf.upfronthosting.co.za>
2017-12-21 18:49:07Michael.Feltlinkissue32399 messages
2017-12-21 18:49:07Michael.Feltcreate