#47
authoradam <adamansky@gmail.com>
Sun, 10 Feb 2013 09:44:11 +0000 (16:44 +0700)
committeradam <adamansky@gmail.com>
Sun, 10 Feb 2013 09:44:11 +0000 (16:44 +0700)
16 files changed:
.idea/jsLibraryMappings.xml
Makefile
pyejdb/nbproject/configurations.xml
pyejdb/pyejdb.iml
pyejdb/pyejdb/__init__.py
pyejdb/setup.py [changed mode: 0644->0755]
pyejdb/src/EJDB.c [moved from pyejdb/pyejdb/EJDB.c with 89% similarity]
pyejdb/src/pyejdb.c [moved from pyejdb/pyejdb/pyejdb.c with 85% similarity]
pyejdb/src/pyejdb.h [moved from pyejdb/pyejdb/pyejdb.h with 100% similarity]
tcejdb/Makefile.in
tcejdb/configure
tcejdb/configure.ac
tcejdb/debian/changelog
tcejdb/debian/changelog.in [deleted file]
tcejdb/nbproject/configurations.xml
tcejdb/tcutil.h

index f12d716..19bd4db 100644 (file)
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="JavaScriptLibraryMappings">
-    <file url="PROJECT" libraries="{Node.js v0.8.17 Core Library}" />
     <excludedPredefinedLibrary name="AJAX" />
     <excludedPredefinedLibrary name="DHTML" />
     <excludedPredefinedLibrary name="DOM Core" />
index 59ff0c6..e5b43de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,6 @@ deb-source-packages: fix-changelogs
 
 
 fix-changelogs:
-       - mkdir -p tcejdb/debian && touch tcejdb/debian/changelog.in
        cp ./Changelog ./tcejdb/Changelog
 
 
index 4e8b247..b35c12a 100644 (file)
@@ -2,10 +2,6 @@
 <configurationDescriptor version="88">
   <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
     <df root="." name="pyejdb">
-      <df name="pyejdb">
-        <in>pyejdb.c</in>
-        <in>pyejdb.h</in>
-      </df>
     </df>
     <logicalFolder name="ExternalFiles"
                    displayName="Important Files"
           </cTool>
         </makeTool>
       </makefileType>
-      <item path="pyejdb/pyejdb.c" ex="false" tool="0" flavor2="2">
-        <cTool>
-        </cTool>
-      </item>
-      <item path="pyejdb/pyejdb.h" ex="false" tool="3" flavor2="0">
-      </item>
     </conf>
   </confs>
 </configurationDescriptor>
index ada9c0e..30e8643 100644 (file)
@@ -11,6 +11,7 @@
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$/pyejdb" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
     </content>
     <content url="file://$USER_HOME$/tmp/mongo-python-driver">
       <excludeFolder url="file://$USER_HOME$/tmp/mongo-python-driver/doc/api" />
index e603ec1..28e0d35 100644 (file)
@@ -1 +1,3 @@
-from . import pyejdb
\ No newline at end of file
+from . import _pyejdb
+#test
+
old mode 100644 (file)
new mode 100755 (executable)
index 04f2235..e4eef2e
@@ -1,7 +1,9 @@
+#!/usr/bin/python3.2
 from platform import python_version
 from os import name as os_name
 from distutils.command.build_ext import build_ext as _build_ext
 from distutils.core import setup, Extension
+
 from ctypes.util import find_library
 from ctypes import cdll, c_char_p
 from sys import argv
@@ -42,14 +44,14 @@ def check_extension(ext):
 
 ejdb_ext = EJDBPythonExt(True, "tcejdb", "EJDB", "1.0.57",
                          "tcversion", "http://ejdb.org",
-                         "pyejdb", ["pyejdb/pyejdb.c"],
+                         "_pyejdb", ["src/pyejdb.c"],
                          libraries=["tcejdb", "z", "pthread", "m", "c"])
 
 class build_ext(_build_ext):
     def finalize_options(self):
         _build_ext.finalize_options(self)
         if "sdist" not in argv:
-            self.extensions = [ext.c_ext for ext in (ejdb_ext) if check_extension(ext)]
+            self.extensions = [ext.c_ext for ext in (ejdb_ext,) if check_extension(ext)]
 
 setup(
     name="pyejdb",
similarity index 89%
rename from pyejdb/pyejdb/EJDB.c
rename to pyejdb/src/EJDB.c
index 025dbd3..cd5c014 100644 (file)
@@ -38,7 +38,7 @@ EJDBType Database.\n\
 \n\
 See http://ejdb.org");
 
-/* HDB.open(path, mode) */
+/* EJDB.open(path, mode) */
 PyDoc_STRVAR(EJDB_open_doc,
         "open(path, mode)\n\
 \n\
@@ -58,18 +58,29 @@ static PyObject* EJDB_open(PEJDB *self, PyObject *args) {
     Py_RETURN_NONE;
 }
 
+/* EJDB.close() */
+PyDoc_STRVAR(EJDB_close_doc, "close()\n\
+\n\
+Close the database.");
+
+static PyObject* EJDB_close(PEJDB *self) {
+    if (!ejdbclose(self->ejdb)) {
+        return set_ejdb_error(self->ejdb);
+    }
+    Py_RETURN_NONE;
+}
+
 /* EJDBType.tp_methods */
 static PyMethodDef EJDB_tp_methods[] = {
     {"open", (PyCFunction) EJDB_open, METH_VARARGS, EJDB_open_doc},
-    //{"close", (PyCFunction) HDB_close, METH_NOARGS, HDB_close_doc},
+    {"close", (PyCFunction) EJDB_close, METH_NOARGS, EJDB_close_doc},
     {NULL}
 };
 
-
 static PyTypeObject EJDBType = {
     PyVarObject_HEAD_INIT(NULL, 0)
-    "pyejdb.EJDB",                            /*tp_name*/
-    sizeof (EJDB),                            /*tp_basicsize*/
+    "_pyejdb.EJDB",                            /*tp_name*/
+    sizeof (PEJDB),                            /*tp_basicsize*/
     0,                                        /*tp_itemsize*/
     (destructor) EJDB_tp_dealloc,             /*tp_dealloc*/
     0,                                        /*tp_print*/
similarity index 85%
rename from pyejdb/pyejdb/pyejdb.c
rename to pyejdb/src/pyejdb.c
index 95fe1bd..4ee7e57 100644 (file)
@@ -1,6 +1,6 @@
 #include "pyejdb.h"
 
-/* HDB */
+/* PEJDB */
 typedef struct {
     PyObject_HEAD
     EJDB *ejdb;
@@ -9,7 +9,7 @@ typedef struct {
 #include "EJDB.c"
 
 PyDoc_STRVAR(ejdb_m_doc, "EJDB http://ejdb.org");
-PyDoc_STRVAR(ejdb_version_doc, "version() -> str\n\n Returns the version string of the underlying EJDB library.");
+PyDoc_STRVAR(ejdb_version_doc, "version() -> str\n\nReturns the version string of the underlying EJDB library.");
 
 static PyObject* ejdb_version(PyObject *module) {
     return PyString_FromString(tcversion);
@@ -26,14 +26,14 @@ static PyMethodDef pyejdb_m_methods[] = {
 /* pyejdb_module */
 static PyModuleDef pyejdb_module = {
     PyModuleDef_HEAD_INIT,
-    "pyejdb", /*m_name*/
+    "_pyejdb", /*m_name*/
     ejdb_m_doc, /*m_doc*/
     -1, /*m_size*/
     pyejdb_m_methods, /*m_methods*/
 };
 #endif
 
-PyObject* init_pyejdb() {
+PyObject* init_pyejdb(void) {
     PyObject *pyejdb;
     if (PyType_Ready(&EJDBType)) {
         return NULL;
@@ -41,12 +41,12 @@ PyObject* init_pyejdb() {
 #if PY_MAJOR_VERSION >= 3
     pyejdb = PyModule_Create(&pyejdb_module);
 #else
-    pyejdb = Py_InitModule3("pyejdb", pyejdb_m_methods, pyejdb_m_doc);
+    pyejdb = Py_InitModule3("_pyejdb", pyejdb_m_methods, pyejdb_m_doc);
 #endif
     if (!pyejdb) {
         return NULL;
     }
-    Error = PyErr_NewException("pyejdb.Error", NULL, NULL);
+    Error = PyErr_NewException("_pyejdb.Error", NULL, NULL);
     Py_XINCREF(Error);
     if (!Error || PyModule_AddObject(pyejdb, "Error", Error)) {
         Py_XDECREF(Error);
@@ -92,12 +92,12 @@ fail:
 
 #if PY_MAJOR_VERSION >= 3
 
-PyMODINIT_FUNC PyInit_pyejdb(void) {
+PyMODINIT_FUNC PyInit__pyejdb(void) {
     return init_pyejdb();
 }
 #else
 
-PyMODINIT_FUNC initcabinet(void) {
+PyMODINIT_FUNC init__pyejdb(void) {
     init_pyejdb();
 }
 #endif
similarity index 100%
rename from pyejdb/pyejdb/pyejdb.h
rename to pyejdb/src/pyejdb.h
index 51317c9..8c60958 100644 (file)
@@ -78,7 +78,7 @@ POSTCMD = @MYPOSTCMD@
 #================================================================
 
 
-all : $(LIBRARYFILES) $(COMMANDFILES) $(CGIFILES)
+all : version $(LIBRARYFILES) $(COMMANDFILES) $(CGIFILES)
        @$(POSTCMD)
        @printf '\n'
        @printf '#================================================================\n'
index fa52da9..a71ab10 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for tcejdb 1.0.59.
+# Generated by GNU Autoconf 2.69 for tcejdb 1.0.60.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='tcejdb'
 PACKAGE_TARNAME='tcejdb'
-PACKAGE_VERSION='1.0.59'
-PACKAGE_STRING='tcejdb 1.0.59'
+PACKAGE_VERSION='1.0.60'
+PACKAGE_STRING='tcejdb 1.0.60'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1258,7 +1258,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures tcejdb 1.0.59 to adapt to many kinds of systems.
+\`configure' configures tcejdb 1.0.60 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1319,7 +1319,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of tcejdb 1.0.59:";;
+     short | recursive ) echo "Configuration of tcejdb 1.0.60:";;
    esac
   cat <<\_ACEOF
 
@@ -1426,7 +1426,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-tcejdb configure 1.0.59
+tcejdb configure 1.0.60
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1724,7 +1724,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by tcejdb $as_me 1.0.59, which was
+It was created by tcejdb $as_me 1.0.60, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4348,7 +4348,7 @@ fi
 
 
 # Targets
-ac_config_files="$ac_config_files Makefile tcejdb.pc debian/changelog"
+ac_config_files="$ac_config_files Makefile tcejdb.pc"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -4893,7 +4893,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by tcejdb $as_me 1.0.59, which was
+This file was extended by tcejdb $as_me 1.0.60, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -4946,7 +4946,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-tcejdb config.status 1.0.59
+tcejdb config.status 1.0.60
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -5058,7 +5058,6 @@ do
   case $ac_config_target in
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "tcejdb.pc") CONFIG_FILES="$CONFIG_FILES tcejdb.pc" ;;
-    "debian/changelog") CONFIG_FILES="$CONFIG_FILES debian/changelog" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
index ef5fd6b..8f4d438 100644 (file)
@@ -11,7 +11,7 @@ test -n "$CPPFLAGS" && MYCPPFLAGS="$CPPFLAGS $MYCPPFLAGS"
 test -n "$LDFLAGS" && MYLDFLAGS="$LDFLAGS $MYLDFLAGS"
 
 # Package name
-AC_INIT(tcejdb, 1.0.59)
+AC_INIT(tcejdb, 1.0.60)
 
 # Package information
 MYLIBVER=9
@@ -366,7 +366,7 @@ AC_SUBST(PACKAGE_NAME)
 AC_SUBST(PACKAGE_VERSION)
 
 # Targets
-AC_OUTPUT(Makefile tcejdb.pc debian/changelog)
+AC_OUTPUT(Makefile tcejdb.pc)
 
 # Messages
 printf '#================================================================\n'
index 84b1d96..9884467 100644 (file)
@@ -1,3 +1,9 @@
+libtcejdb (1.0.60) unstable; urgency=low
+
+  * Fixed version number in tcutil.h 
+
+ -- Anton Adamansky <adamansky@gmail.com>  Sun, 10 Feb 2013 15:34:29 +0700
+
 libtcejdb (1.0.59) unstable; urgency=low
 
   * Initial Release.
diff --git a/tcejdb/debian/changelog.in b/tcejdb/debian/changelog.in
deleted file mode 100644 (file)
index cd73778..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-libtcejdb (@PACKAGE_VERSION@) unstable; urgency=low
-
-  * Initial Release.
-
- -- Anton Adamansky <adamansky@gmail.com>  Sat, 02 Feb 2013 23:42:28 +0700
-
index 788bb5f..cf6c1db 100644 (file)
@@ -1,9 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<configurationDescriptor version="84">
+<configurationDescriptor version="88">
   <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
-    <df name="tcejdb" root=".">
-      <df name="autom4te.cache">
-      </df>
+    <df root="." name="tcejdb">
       <df name="bros">
         <in>bdbtest.c</in>
         <in>cdbtest.c</in>
         <in>tctest.c</in>
         <in>tdbtest.c</in>
       </df>
-      <df name="doc">
-      </df>
-      <df name="lab">
-      </df>
-      <df name="man">
-      </df>
       <df name="samples">
         <df name="sample1">
           <in>sample1.c</in>
         </df>
       </df>
-      <df name="static">
-      </df>
       <df name="testejdb">
         <in>t1.c</in>
         <in>t2.c</in>
           </cTool>
         </makeTool>
       </makefileType>
+      <item path="bros/bdbtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/cdbtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/cmpsqltctest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/gdbmtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/maptest.cc" ex="false" tool="1" flavor2="4">
+        <ccTool>
+        </ccTool>
+      </item>
+      <item path="bros/ndbmtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/qdbmtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/sdbmtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/sqltest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/tctest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="bros/tdbtest.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
       <item path="bson.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
       </item>
+      <item path="bson.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="ejdb.c" ex="false" tool="0" flavor2="2">
         <cTool>
+          <preprocessorList>
+            <Elem>_MYTESTS</Elem>
+          </preprocessorList>
         </cTool>
       </item>
+      <item path="ejdb.h" ex="false" tool="3" flavor2="0">
+      </item>
+      <item path="ejdb_private.h" ex="false" tool="3" flavor2="0">
+      </item>
+      <item path="ejdbutl.c" ex="false" tool="0" flavor2="2">
+        <cTool>
+        </cTool>
+      </item>
+      <item path="ejdbutl.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="encoding.c" ex="false" tool="0" flavor2="2">
         <cTool>
           <preprocessorList>
           </preprocessorList>
         </cTool>
       </item>
+      <item path="encoding.h" ex="false" tool="3" flavor2="0">
+      </item>
       <folder path="tcejdb/samples">
         <cTool>
           <preprocessorList>
           </preprocessorList>
         </cTool>
       </item>
+      <item path="md5.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="myconf.c" ex="false" tool="0" flavor2="2">
         <cTool>
           <preprocessorList>
           </preprocessorList>
         </cTool>
       </item>
+      <item path="myconf.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="numbers.c" ex="false" tool="0" flavor2="2">
         <cTool>
           <preprocessorList>
         <cTool>
         </cTool>
       </item>
+      <item path="tcadb.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="tcamgr.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
         <cTool>
         </cTool>
       </item>
+      <item path="tcbdb.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="tcbmgr.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
         <cTool>
         </cTool>
       </item>
+      <item path="tcfdb.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="tcfmgr.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
         <cTool>
         </cTool>
       </item>
+      <item path="tchdb.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="tchmgr.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
         <cTool>
         </cTool>
       </item>
+      <item path="tctdb.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="tctmgr.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
         <cTool>
         </cTool>
       </item>
+      <item path="tcutil.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="testejdb/t1.c" ex="false" tool="0" flavor2="2">
         <cTool>
         </cTool>
           </preprocessorList>
         </cTool>
       </item>
+      <item path="utf8proc.h" ex="false" tool="3" flavor2="0">
+      </item>
       <item path="utf8proc_data.c" ex="false" tool="0" flavor2="2">
         <cTool>
           <preprocessorList>
index dfa3117..3da3815 100644 (file)
@@ -3719,7 +3719,7 @@ typedef unsigned char TCBITMAP;          /* type of a bit map object */
 
 #include <stdio.h>
 
-#define _TC_VERSION    "1.0.0"
+#define _TC_VERSION    "1.0.60"
 #define _TC_LIBVER     911
 #define _TC_FORMATVER  "1.0"