summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-09-01 12:41:28 +0200
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-09-03 19:02:37 +0200
commit35ff3d6950e6428c3a6c3d7b275313db2412aafa (patch)
treebb6659da78f8020d09be8d849cfb1baa0416634a /bindings
parent8ebeeb9a361d6bb9f7f74039eef9feb320feeb17 (diff)
downloadlasso-35ff3d6950e6428c3a6c3d7b275313db2412aafa.tar.gz
lasso-35ff3d6950e6428c3a6c3d7b275313db2412aafa.tar.xz
lasso-35ff3d6950e6428c3a6c3d7b275313db2412aafa.zip
[Strings] add string constant for the internal XML attributes used in dumps
Add string constants for signature method, signature type, private key (file path or content), private key password and certificate (file path or content). Add cast for xmlChar constant strings definition in python bindings, it assumed all constant strings were char*.
Diffstat (limited to 'bindings')
-rw-r--r--bindings/java/lang.py2
-rw-r--r--bindings/perl/lang.py2
-rw-r--r--bindings/php5/wrapper_source.py2
-rw-r--r--bindings/python/lang.py2
4 files changed, 4 insertions, 4 deletions
diff --git a/bindings/java/lang.py b/bindings/java/lang.py
index 904aff78..47d5a3b5 100644
--- a/bindings/java/lang.py
+++ b/bindings/java/lang.py
@@ -364,7 +364,7 @@ protected static native void destroy(long cptr);
elif c[0] == 's':
print >>fd, wrapper_decl(s,'jstring')
print >>fd, ') {'
- print >>fd, ' return (*env)->NewStringUTF(env, %s);' % c[1]
+ print >>fd, ' return (*env)->NewStringUTF(env, (char*) %s);' % c[1]
print >>fd, '}'
elif c[0] == 'b':
print >>fd, wrapper_decl(s,'jboolean')
diff --git a/bindings/perl/lang.py b/bindings/perl/lang.py
index 0d3e4f8b..7390ecb4 100644
--- a/bindings/perl/lang.py
+++ b/bindings/perl/lang.py
@@ -223,7 +223,7 @@ INCLUDE: LassoNode.xs
if type == 'i':
self.xs.pn('ct = newSViv(%s);' % name)
elif type == 's':
- self.xs.pn('ct = newSVpv(%s, 0);' % name)
+ self.xs.pn('ct = newSVpv((char*)%s, 0);' % name)
elif type == 'b': # only one case LASSO_WSF_ENABLED
self.xs.unindent()
self.xs.pn('''#ifdef %s
diff --git a/bindings/php5/wrapper_source.py b/bindings/php5/wrapper_source.py
index 9b2698f2..7148fd9c 100644
--- a/bindings/php5/wrapper_source.py
+++ b/bindings/php5/wrapper_source.py
@@ -76,7 +76,7 @@ PHP_MINIT_FUNCTION(lasso)
if c[0] == 'i':
print >> self.fd, ' REGISTER_LONG_CONSTANT("%s", %s, CONST_CS|CONST_PERSISTENT);' % (c[1], c[1])
elif c[0] == 's':
- print >> self.fd, ' REGISTER_STRING_CONSTANT("%s", %s, CONST_CS|CONST_PERSISTENT);' % (c[1], c[1])
+ print >> self.fd, ' REGISTER_STRING_CONSTANT("%s", (char*) %s, CONST_CS|CONST_PERSISTENT);' % (c[1], c[1])
elif c[0] == 'b':
print >> self.fd, '''\
#ifdef %s
diff --git a/bindings/python/lang.py b/bindings/python/lang.py
index ab987266..8be92e39 100644
--- a/bindings/python/lang.py
+++ b/bindings/python/lang.py
@@ -692,7 +692,7 @@ register_constants(PyObject *d)
if c[0] == 'i':
print >> fd, ' obj = PyInt_FromLong(%s);' % c[1]
elif c[0] == 's':
- print >> fd, ' obj = PyString_FromString(%s);' % c[1]
+ print >> fd, ' obj = PyString_FromString((char*)%s);' % c[1]
elif c[0] == 'b':
print >> fd, '''\
#ifdef %s