* 1.3.x: (101 commits)
rand.c: Show keyword argument as optional.
mp.c: Fix punctuation error in docstrings.
t/t-*.py: Use the `WriteBuffer.contents' property.
t/t-bytes.py: Check that indexing, slicing, etc. return `C.ByteString'.
t/t-algorithms.py: Add a simple test for `Keccak1600.copy'.
t/t-algorithms.py: Add tests for other HSalsa20 and HChaCha key sizes.
t/t-algorithms.py: Add AEAD tests.
t/t-algorithms.py: Add tests for the new `KeySZ.pad' method.
catacomb/__init__.py (KeySZRange.pad): Return correct value.
algorithms.c: Propagate `AEADF_NOAAD' to `aad' objects.
algorithms.c (
AEADAAD.copy): Propagate the hashed length to the copy.
t/: Add a test suite.
ec.c: Don't lose error status when constructing points from a sequence.
ec.c: Free partially constructed points coordinatewise.
*.c: Be more careful about `PySequence_Size'.
key.c: Reformat the rest of the `KeyError' constructor.
key.c: Parse `KeyError' constructor arguments by hand.
catacomb-python.h: Add a macro for raising `OverflowError'.
key.c: Collect `KeyError' argument count as a separate step.
key.c: Use tuple functions on `KeyError' argument tuple.
...
#include <catacomb/share.h>
#include <catacomb/gfshare.h>
+/*----- Other preliminaries -----------------------------------------------*/
+
+#define GOBBLE_SEMI extern int notexist
+#if defined(__GNUC__) && defined(__ELF__)
+# define PRIVATE_SYMBOLS _Pragma("GCC visibility push(hidden)") GOBBLE_SEMI
+# define PUBLIC_SYMBOLS _Pragma("GCC visibility pop") GOBBLE_SEMI
+# define EXPORT __attribute__((__visibility__("default")))
+#else
+# define PRIVATE_SYMBOLS GOBBLE_SEMI
+# define PUBLIC_SYMBOLS GOBBLE_SEMI
+# define EXPORT
+#endif
+
+PRIVATE_SYMBOLS;
+
/*----- Utility macros ----------------------------------------------------*/
#define RETURN_OBJ(obj) do { Py_INCREF(obj); return (obj); } while (0)
char *argv0;
if (!PyArg_ParseTuple(arg, "s:_ego", &argv0))
return (0);
- if (strcmp(QUIS, "<UNNAMED>") == 0)
+ if (STRCMP(QUIS, ==, "<UNNAMED>"))
ego(argv0);
RETURN_NONE;
}
if (!Py_HashRandomizationFlag) return;
seed = getenv("PYTHONHASHSEED");
- if (!seed || strcmp(seed, "random") == 0) r = GR_WORD(&rand_global);
+ if (!seed || STRCMP(seed, ==, "random")) r = GR_WORD(&rand_global);
else r = strtoul(seed, 0, 0);
if (!r) r = 0xe011f220; /* zero doesn't work well */
unihash_setkey(&unihash_global, r);
#endif
}
-void init_base(void)
+EXPORT void init_base(void)
{
PyObject *mod;
addmethods(methods);