Merge branch '1.3.x'
[catacomb-python] / rand.c
diff --git a/rand.c b/rand.c
index b662fd5..37ab5e4 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -27,7 +27,9 @@
 /*----- Header files ------------------------------------------------------*/
 
 #include "catacomb-python.h"
+PUBLIC_SYMBOLS;
 #include "algorithms.h"
+PRIVATE_SYMBOLS;
 
 /*----- Main code ---------------------------------------------------------*/
 
@@ -54,14 +56,14 @@ PyObject *grand_pywrap(grand *r, unsigned f)
   PyTypeObject *ty = grand_pytype;
   PyObject *ob;
 
-  if (strcmp(r->ops->name, "rand") == 0) ty = truerand_pytype;
-  else if (strcmp(r->ops->name, "lcrand") == 0) ty = lcrand_pytype;
-  else if (strcmp(r->ops->name, "fibrand") == 0) ty = fibrand_pytype;
-  else if (strcmp(r->ops->name, "dsarand") == 0) ty = dsarand_pytype;
-  else if (strcmp(r->ops->name, "bbs") == 0) ty = bbs_pytype;
-  else if (strcmp(r->ops->name, "sslprf") == 0) ty = sslprf_pytype;
-  else if (strcmp(r->ops->name, "tlsdx") == 0) ty = tlsdx_pytype;
-  else if (strcmp(r->ops->name, "tlsprf") == 0) ty = tlsprf_pytype;
+  if (STRCMP(r->ops->name, ==, "rand")) ty = truerand_pytype;
+  else if (STRCMP(r->ops->name, ==, "lcrand")) ty = lcrand_pytype;
+  else if (STRCMP(r->ops->name, ==, "fibrand")) ty = fibrand_pytype;
+  else if (STRCMP(r->ops->name, ==, "dsarand")) ty = dsarand_pytype;
+  else if (STRCMP(r->ops->name, ==, "bbs")) ty = bbs_pytype;
+  else if (STRCMP(r->ops->name, ==, "sslprf")) ty = sslprf_pytype;
+  else if (STRCMP(r->ops->name, ==, "tlsdx")) ty = tlsdx_pytype;
+  else if (STRCMP(r->ops->name, ==, "tlsprf")) ty = tlsprf_pytype;
   else if ((ob = PyDict_GetItemString(gccrands_dict, r->ops->name)) != 0)
     ty = (PyTypeObject *)ob;
   return (grand_dopywrap(ty, r, f));