Ticket #34022: patch-svipc_module.c.diff

File patch-svipc_module.c.diff, 1.1 KB (added by paumard, 13 years ago)
  • python/svipc_module.c

    diff -u python/svipc_module.c.orig python/svipc_module.c
    old new  
    233233
    234234   static char *kwlist[] = {"key", "id", NULL};
    235235
    236    if (PyArg_ParseTupleAndKeywords(args, kwds,"is", kwlist, &key, &id))
     236   if (!PyArg_ParseTupleAndKeywords(args, kwds,"is", kwlist, &key, &id))
    237237      PYTHON_SVIPC_USAGE("shm_free(key, id)");
    238238
    239239   int status = svipc_shm_free(key, id);
     
    259259
    260260   static char *kwlist[] = {"key", NULL};
    261261
    262    if (PyArg_ParseTupleAndKeywords(args, kwds,"i", kwlist, &key))
     262   if (!PyArg_ParseTupleAndKeywords(args, kwds,"i", kwlist, &key))
    263263      PYTHON_SVIPC_USAGE("shm_cleanup(key)");
    264264
    265265   int status = svipc_shm_cleanup(key);
     
    327327
    328328   static char *kwlist[] = {"key", NULL};
    329329
    330    if (PyArg_ParseTupleAndKeywords(args, kwds,"i", kwlist, &key))
     330   if (!PyArg_ParseTupleAndKeywords(args, kwds,"i", kwlist, &key))
    331331      PYTHON_SVIPC_USAGE("sem_cleanup(key)");
    332332
    333333   int status = svipc_sem_cleanup(key);