At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
------------------------------------------------------------
revno: 292
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Sun 2007-11-25 15:22:57 -0800
message:
Fixed build for all languages.
Added MGM API to all languages.
added:
csharp/mgmapi.i mgmapi.i-20071125232130-9b1hlszp987p1mhb-1
lua/mgmapi.i mgmapi.i-20071125230711-7m3mkivpp4acghz4-1
php/mgmapi.i mgmapi.i-20071125230227-iss6d3rzl7bf9rzs-1
modified:
ChangeLog changelog-20070228020914-u2pk759xg7thauwf-2
acinclude.m4 acinclude.m4-20070228020914-u2pk759xg7thauwf-8
configure.in configure.in-20070228020914-u2pk759xg7thauwf-13
csharp/Makefile.am makefile.in-20070228073157-gkwqutuh9f3nq7s2-1
csharp/ndbapi.i
svn-v2:10@5fca6d9a-db22-0410-b55c-899b0a28da89-trunk-csharp%2fndb.i
interface/ndbapi/Ndb.i ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
lua/Makefile.am makefile.am-20070727221140-30x3yi1g0lf9rflk-2
lua/ndbapi.i ndbapi.i-20070727221140-30x3yi1g0lf9rflk-3
m4/ac_python_devel.m4 ac_python_devel.m4-20071028000601-dtshci4bkh8dbeok-1
php/Makefile.am makefile.am-20070414230657-agiyu1zcqcr6ugkn-2
php/ndbapi.i ndbapi.i-20070414230657-agiyu1zcqcr6ugkn-1
=== added file 'csharp/mgmapi.i'
--- a/csharp/mgmapi.i 1970-01-01 00:00:00 +0000
+++ b/csharp/mgmapi.i 2007-11-25 23:22:57 +0000
@@ -0,0 +1,32 @@
+/* ndb-connectors: Wrappers for the NDBAPI
+ Copyright (C) 2006 MySQL, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+%module "mgmapi"
+
+%include "enumtypesafe.swg"
+
+
+%include "mgmapi/mgmglobals.i"
+
+
+
+%{
+#define NDB_exception(excp,msg) { SWIG_CSharpSetPendingExceptionCustom(excp,msg); }
+#define NDB_exception_err(excp,msg,err) { SWIG_CSharpSetPendingExceptionCustom(excp,msg);
}
+
+%}
=== added file 'lua/mgmapi.i'
--- a/lua/mgmapi.i 1970-01-01 00:00:00 +0000
+++ b/lua/mgmapi.i 2007-11-25 23:22:57 +0000
@@ -0,0 +1,29 @@
+/* ndb-connectors: Wrappers for the NDBAPI
+ Copyright (C) 2006 MySQL, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+%module "mgmapi"
+
+%include "mgmapi/mgmglobals.i"
+
+
+
+%{
+
+#define NDB_exception(code,msg) do { SWIG_fail; } while(0);
+#define NDB_exception_err(code,msg,err) do { SWIG_fail; } while(0);
+%}
=== added file 'php/mgmapi.i'
--- a/php/mgmapi.i 1970-01-01 00:00:00 +0000
+++ b/php/mgmapi.i 2007-11-25 23:22:57 +0000
@@ -0,0 +1,43 @@
+/* ndb-connectors: Wrappers for the NDBAPI
+ Copyright (C) 2006 MySQL, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+%module "libmgmapi"
+
+%include "mgmapi/mgmglobals.i"
+
+
+
+%{
+
+#include "zend_exceptions.h"
+
+// # define SWIG_exception(code, msg) { mt_zend_throw_exception(NULL, msg, code
TSRMLS_CC); }
+# define NDB_exception(code, msg) { zend_throw_exception(NULL, (char *)msg, code
TSRMLS_CC); }
+# define NDB_exception_err(code, msg, err) { zend_throw_exception(NULL, (char *)msg, code
TSRMLS_CC); }
+
+
+//ZEND_API zval * mt_zend_throw_exception(zend_class_entry *exception_ce, const char
*message, long code TSRMLS_DC);
+
+ZEND_API zval * mt_zend_throw_exception(zend_class_entry *exception_ce, const char
*message, long code TSRMLS_DC)
+{
+ char * mt_message = (char *)malloc(sizeof(message));
+ strcpy(mt_message,message);
+ zval * retval = zend_throw_exception(exception_ce,mt_message,code);
+ free(mt_message);
+ return retval; }
+%}
=== modified file 'ChangeLog'
--- a/ChangeLog 2007-11-25 22:01:45 +0000
+++ b/ChangeLog 2007-11-25 23:22:57 +0000
@@ -3,6 +3,7 @@
Added NdbOperation::getTable()
Added forced GC to OutOfConnectionsProblemTest
Updated SWIG to v1.3.33
+Fixed build in all languages.
0.5.1.22.3:
Fixed BUG#32669 ndb-connectors rely on not yet standard map::at() method
Fixed BUG#32671 ndb-connector java compilation fails with "/bin/sh: no:
=== modified file 'acinclude.m4'
--- a/acinclude.m4 2007-11-16 04:28:11 +0000
+++ b/acinclude.m4 2007-11-25 23:22:57 +0000
@@ -82,7 +82,7 @@
[AS_HELP_STRING([--with-csharp],
[BULD NDB/.NET @<:@default=no@:>@])],
[with_csharp=$withval],
- [with_csharp=no])
+ [with_csharp=yes])
AS_IF([test "x$with_csharp" = "xyes"],[
AC_CHECK_PROGS(MONO,[mono])
=== modified file 'configure.in'
--- a/configure.in 2007-11-23 20:50:11 +0000
+++ b/configure.in 2007-11-25 23:22:57 +0000
@@ -20,6 +20,8 @@
[Define to 1 if you want to profile async callbacks])],
[])
+AC_LANG(C++)
+
if test "$with_debug" = "yes"
then
CXXFLAGS="-ggdb3 -Wall -I\${top_srcdir}"
=== modified file 'csharp/Makefile.am'
--- a/csharp/Makefile.am 2007-11-06 22:59:00 +0000
+++ b/csharp/Makefile.am 2007-11-25 23:22:57 +0000
@@ -7,6 +7,11 @@
libndbsharp_la_LDFLAGS = -fpic
libndbsharp_la_CPPFLAGS = $(PTHREAD_CFLAGS)
libndbsharp_la_DEPENDENCIES = MySql.Cluster.NdbApi.dll
+lib_LTLIBRARIES = libmgmsharp.la
+libmgmsharp_la_SOURCES = mgmapi.cpp
+libmgmsharp_la_LDFLAGS = -fpic
+libmgmsharp_la_CPPFLAGS = $(PTHREAD_CFLAGS)
+libmgmsharp_la_DEPENDENCIES = MySql.Cluster.MgmApi.dll
test: test.exe test2.exe
@@ -15,6 +20,8 @@
.cs.exe: MySql.Cluster.NdbApi.dll ndbapi.cpp
$(MCS) -r:MySql.Cluster.NdbApi.dll -r:$(MYSQL_DLL) $<
+MySql.Cluster.MgmApi.dll:
+ $(MCS) -target:library -out:$@ mgmapi/*.cs exceptions.cs
MySql.Cluster.NdbApi.dll:
$(MCS) -target:library -out:$@ ndbapi/*.cs exceptions.cs
=== modified file 'csharp/ndbapi.i'
--- a/csharp/ndbapi.i 2007-11-06 22:59:00 +0000
+++ b/csharp/ndbapi.i 2007-11-25 23:22:57 +0000
@@ -137,11 +137,12 @@
%}
-%typemap(ctype) (asynch_callback_t *) "AsynchCallback_t"
+/*%typemap(ctype) (asynch_callback_t *) "AsynchCallback_t"
%typemap(cstype) asynch_callback_t * "Object"
-%typemap(imtype) asynch_callback_t * "BaseCallback"
+//%typemap(imtype) asynch_callback_t * "BaseCallback"
+%typemap(imtype) asynch_callback_t * "System.Runtime.InteropServices.HandleRef"
%typemap(csin) asynch_callback_t * "(Object)$csinput"
-
+*/
%pragma(csharp) imclasscode=%{
=== modified file 'interface/ndbapi/Ndb.i'
--- a/interface/ndbapi/Ndb.i 2007-11-06 22:59:00 +0000
+++ b/interface/ndbapi/Ndb.i 2007-11-25 23:22:57 +0000
@@ -128,7 +128,11 @@
#if defined(SWIGPERL)
SWIG_croak_null();
#else
+#if defined(SWIGPHP)
+ return;
+#else
return (Uint64)0;
+#endif
#endif
}
}
=== modified file 'lua/Makefile.am'
--- a/lua/Makefile.am 2007-11-06 22:59:00 +0000
+++ b/lua/Makefile.am 2007-11-25 23:22:57 +0000
@@ -1,10 +1,10 @@
# -*- Mode: Makefile -*-
luaarchdir=${libdir}/lua
-luaarch_DATA=ndbapi.so
+luaarch_DATA=ndbapi.so mgmapi.so
CLEANFILES=*.db test-out.rdf core* \
- $(luaarch_DATA) ndbapi.cpp
+ $(luaarch_DATA) ndbapi.cpp mgmapi.cpp
SWIG_OPTS=-I$(top_srcdir) -I$(srcdir) -I$(SWIG_DIR) @MYSQL_INCLUDES@
=== modified file 'lua/ndbapi.i'
--- a/lua/ndbapi.i 2007-11-06 22:59:00 +0000
+++ b/lua/ndbapi.i 2007-11-25 23:22:57 +0000
@@ -24,9 +24,30 @@
%include "ndbapi/ndbglobals.i"
//#define NDB_exception(code,msg) do { ndb_raise_exception(code, msg); SWIG_fail; }
while(0);
+
+%{
+
+#include <stdio.h>
+
+typedef struct
+asynch_callback_t
+{
+ void * obj;
+ long long create_time;
+};
+
+
+
+static void theCallBack(int result,
+ NdbTransaction *trans,
+ void *aObject)
+
+{ printf("async transactions not implemented for LUA\n"); }
+
#define NDB_exception(code,msg) do { SWIG_fail; } while(0);
#define NDB_exception_err(code,msg,err) do { SWIG_fail; } while(0);
+%}
%include "ndbapi/NdbFactory.i"
%include "ndbapi/NdbClusterConnection.i"
%include "ndbapi/Ndb.i"
=== modified file 'm4/ac_python_devel.m4'
--- a/m4/ac_python_devel.m4 2007-11-12 22:57:53 +0000
+++ b/m4/ac_python_devel.m4 2007-11-25 23:22:57 +0000
@@ -146,7 +146,7 @@
# final check to see if everything compiles alright
#
AC_MSG_CHECKING([consistency of all components of python development
environment])
- AC_LANG_PUSH([C])
+ #AC_LANG_PUSH([C])
# save current global flags
LIBS="$ac_save_LIBS $PYTHON_LDFLAGS"
CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS"
@@ -158,7 +158,7 @@
AC_MSG_RESULT([$pythonexists])
- AC_LANG_POP
+ #AC_LANG_POP
# turn back to default flags
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
=== modified file 'php/Makefile.am'
--- a/php/Makefile.am 2007-11-15 23:22:16 +0000
+++ b/php/Makefile.am 2007-11-25 23:22:57 +0000
@@ -1,16 +1,29 @@
-BUILT_SOURCES = ndbapi_wrap.cpp php_libndbapi.h libndbapi.php
+NDB_BUILT_SOURCES = ndbapi.cpp php_libndbapi.h
+MGM_BUILT_SOURCES = mgmapi.cpp php_libmgmapi.h
+BUILT_SOURCES = $(NDB_BUILT_SOURCES) $(MGM_BUILT_SOURCES)
NDBAPI_SWIG_SRC = ndbapi.i $(SWIG_NDB_SOURCES)
+MGMAPI_SWIG_SRC = mgmapi.i $(SWIG_MGM_SOURCES)
libdir = $(PHP_EXTDIR)
-lib_LTLIBRARIES = libndbapi.la
-libndbapi_la_SOURCES = $(BUILT_SOURCES)
+lib_LTLIBRARIES = libndbapi.la libmgmapi.la
+libndbapi_la_SOURCES = $(NDB_BUILT_SOURCES)
libndbapi_la_CPPFLAGS = $(PHP_CPPFLAGS) $(MYSQL_INCLUDES)
-noinst_HEADERS = php_libndbapi.h
-
-
-php_libndbapi.h: ndbapi_wrap.cpp
-
-ndbapi_wrap.cpp: $(NDBAPI_SWIG_SRC)
+libmgmapi_la_SOURCES = $(NDB_BUILT_SOURCES)
+libmgmapi_la_CPPFLAGS = $(PHP_CPPFLAGS) $(MYSQL_INCLUDES)
+noinst_HEADERS = php_libndbapi.h php_libmgmapi.h
+
+CLEANFILES = $(BUILT_SOURCES) libmgmapi.php libndbapi.php
+
+
+php_libndbapi.h: ndbapi.cpp
+
+php_libmgmapi.h: mgmapi.cpp
+
+ndbapi.cpp: $(NDBAPI_SWIG_SRC)
+
+mgmapi.cpp: $(MGMAPI_SWIG_SRC)
+
+.i.cpp: $(SWIG_SOURCES)
$(SWIG) -php5 -I$(SWIG_DIR) $(DEFAULT_INCLUDES) $(MYSQL_INCLUDES) -o $@ $<
distclean-local:
=== modified file 'php/ndbapi.i'
--- a/php/ndbapi.i 2007-11-15 23:22:16 +0000
+++ b/php/ndbapi.i 2007-11-25 23:22:57 +0000
@@ -18,14 +18,16 @@
%module libndbapi
-%include "globals.i"
+%include "ndbapi/ndbglobals.i"
+
%{
#include "zend_exceptions.h"
// # define SWIG_exception(code, msg) { mt_zend_throw_exception(NULL, msg, code
TSRMLS_CC); }
-# define SWIG_exception(code, msg) { zend_throw_exception(NULL, (char *)msg, code
TSRMLS_CC); }
+# define NDB_exception(code, msg) { zend_throw_exception(NULL, (char *)msg, code
TSRMLS_CC); }
+# define NDB_exception_err(code, msg, err) { zend_throw_exception(NULL, (char *)msg, code
TSRMLS_CC); }
//ZEND_API zval * mt_zend_throw_exception(zend_class_entry *exception_ce, const char
*message, long code TSRMLS_DC);
@@ -37,14 +39,39 @@
zval * retval = zend_throw_exception(exception_ce,mt_message,code);
free(mt_message);
return retval; }
+
+typedef struct
+asynch_callback_t
+{
+ zval * obj;
+ long long create_time;
+};
+
+
+
+static void theCallBack(int result,
+ NdbTransaction *trans,
+ void *aObject)
+
+{ printf("async not implemented for php yet\n"); }
+
%}
%include "ndbapi/NdbFactory.i"
%include "ndbapi/NdbClusterConnection.i"
%include "ndbapi/Ndb.i"
+%include "ndbapi/NdbDictionary.i"
%include "ndbapi/NdbTransaction.i"
+
+
%include "ndbapi/NdbOperation.i"
%include "ndbapi/NdbScanOperation.i"
+%include "ndbapi/NdbIndexOperation.i"
+%include "ndbapi/NdbIndexScanOperation.i"
+%include "ndbapi/NdbEventOperation.i"
+
%include "ndbapi/NdbRecAttr.i"
%include "ndbapi/NdbError.i"
+%include "ndbapi/NdbBlob.i"
+%include "ndbapi/NdbScanFilter.i"
| Thread |
|---|
| • Rev 292: Fixed build for all languages. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel | Monty Taylor | 26 Nov |