Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
e52fc6f0
Commit
e52fc6f0
authored
Jan 14, 2014
by
Mukund Sivaraman
Browse files
Merge branch 'trac2026'
parents
e64974cc
e3913c4a
Changes
5
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
e52fc6f0
...
...
@@ -410,6 +410,24 @@ fi
AC_SUBST(PYTHON_LIB)
LDFLAGS=$LDFLAGS_SAVED
# Python 3.2 changed the return type of internal hash function to
# Py_hash_t and some platforms (such as Solaris) strictly check for long
# vs Py_hash_t. So we detect and use the appropriate return type.
# Remove this test (and associated changes in pydnspp_config.h.in) when
# we require Python 3.2.
have_py_hash_t=0
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS=${PYTHON_INCLUDES}
AC_MSG_CHECKING(for Py_hash_t)
AC_TRY_COMPILE([#include <Python.h>
Py_hash_t h;],,
[AC_MSG_RESULT(yes)
have_py_hash_t=1],
[AC_MSG_RESULT(no)])
CPPFLAGS="$CPPFLAGS_SAVED"
HAVE_PY_HASH_T=$have_py_hash_t
AC_SUBST(HAVE_PY_HASH_T)
# Check for the setproctitle module
if test "$setproctitle_check" = "yes" ; then
AC_MSG_CHECKING(for setproctitle module)
...
...
@@ -1478,6 +1496,7 @@ AC_CONFIG_FILES([compatcheck/Makefile
src/lib/dns/gen-rdatacode.py
src/lib/dns/Makefile
src/lib/dns/python/Makefile
src/lib/dns/python/pydnspp_config.h
src/lib/dns/python/tests/Makefile
src/lib/dns/tests/Makefile
src/lib/dns/tests/testdata/Makefile
...
...
src/lib/dns/python/.gitignore
View file @
e52fc6f0
/rrclass_constants_inc.cc
/rrtype_constants_inc.cc
/pydnspp_config.h
src/lib/dns/python/Makefile.am
View file @
e52fc6f0
...
...
@@ -5,7 +5,8 @@ AM_CPPFLAGS += $(BOOST_INCLUDES)
AM_CXXFLAGS
=
$(B10_CXXFLAGS)
lib_LTLIBRARIES
=
libb10-pydnspp.la
libb10_pydnspp_la_SOURCES
=
pydnspp_common.cc pydnspp_common.h pydnspp_towire.h
libb10_pydnspp_la_SOURCES
=
pydnspp_common.cc pydnspp_common.h
libb10_pydnspp_la_SOURCES
+=
pydnspp_config.h pydnspp_towire.h
libb10_pydnspp_la_SOURCES
+=
name_python.cc name_python.h
libb10_pydnspp_la_SOURCES
+=
nsec3hash_python.cc nsec3hash_python.h
libb10_pydnspp_la_SOURCES
+=
rrset_python.cc rrset_python.h
...
...
src/lib/dns/python/pydnspp_common.h
View file @
e52fc6f0
...
...
@@ -15,6 +15,8 @@
#ifndef LIBDNS_PYTHON_COMMON_H
#define LIBDNS_PYTHON_COMMON_H 1
#include
<dns/python/pydnspp_config.h>
#include
<Python.h>
#include
<boost/static_assert.hpp>
...
...
@@ -60,11 +62,6 @@ int addClassVariable(PyTypeObject& c, const char* name, PyObject* obj);
/// \return true on success, false on failure
bool
initClass
(
PyTypeObject
&
type
,
const
char
*
name
,
PyObject
*
mod
);
// Short term workaround for unifying the return type of tp_hash
#if PY_MINOR_VERSION < 2
typedef
long
Py_hash_t
;
#endif
/// \brief Convert a hash value of arbitrary type to a Python hash value.
///
/// This templated function is a convenient wrapper to produce a valid hash
...
...
src/lib/dns/python/pydnspp_config.h.in
0 → 100644
View file @
e52fc6f0
// Copyright (C) 2014 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef LIBDNS_PYTHON_CONFIG_H
#define LIBDNS_PYTHON_CONFIG_H 1
// Short term workaround for unifying the return type of tp_hash.
// Remove this test (and associated changes in configure.ac) when we
// require Python 3.2.
#if (!(@HAVE_PY_HASH_T@))
typedef long Py_hash_t;
#endif
#endif // LIBDNS_PYTHON_CONFIG_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment