You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2012/04/14 16:05:15 UTC

[lucy-commits] svn commit: r1326107 - in /lucy/trunk: clownfish/src/CFCBindCore.c core/Lucy.c

Author: nwellnhof
Date: Sat Apr 14 14:05:15 2012
New Revision: 1326107

URL: http://svn.apache.org/viewvc?rev=1326107&view=rev
Log:
Add lucy_init_parcel initialization function

This will we called after the VTables have been set up.

Added:
    lucy/trunk/core/Lucy.c
Modified:
    lucy/trunk/clownfish/src/CFCBindCore.c

Modified: lucy/trunk/clownfish/src/CFCBindCore.c
URL: http://svn.apache.org/viewvc/lucy/trunk/clownfish/src/CFCBindCore.c?rev=1326107&r1=1326106&r2=1326107&view=diff
==============================================================================
--- lucy/trunk/clownfish/src/CFCBindCore.c (original)
+++ lucy/trunk/clownfish/src/CFCBindCore.c Sat Apr 14 14:05:15 2012
@@ -219,6 +219,9 @@ S_write_parcel_h(CFCBindCore *self) {
         "void\n"
         "%sbootstrap_parcel();\n"
         "\n"
+        "void\n"
+        "%sinit_parcel();\n"
+        "\n"
         "#ifdef __cplusplus\n"
         "}\n"
         "#endif\n"
@@ -231,12 +234,12 @@ S_write_parcel_h(CFCBindCore *self) {
                   + strlen(self->header)
                   + strlen(aliases)
                   + strlen(typedefs)
-                  + strlen(prefix)
+                  + 2 * strlen(prefix)
                   + strlen(self->footer)
                   + 50;
     char *file_content = (char*)MALLOCATE(size);
     sprintf(file_content, pattern, self->header, aliases, typedefs, prefix,
-            self->footer);
+            prefix, self->footer);
 
     // Unlink then write file.
     const char *inc_dest = CFCHierarchy_get_include_dest(hierarchy);
@@ -311,6 +314,8 @@ S_write_parcel_c(CFCBindCore *self) {
         "%s"
         "\n"
         "%s"
+        "\n"
+        "    %sinit_parcel();\n"
         "}\n"
         "\n"
         "%s\n";
@@ -322,11 +327,12 @@ S_write_parcel_c(CFCBindCore *self) {
                   + strlen(prefix)
                   + strlen(vt_bootstrap)
                   + strlen(vt_register)
+                  + strlen(prefix)
                   + strlen(self->footer)
                   + 50;
     char *file_content = (char*)MALLOCATE(size);
     sprintf(file_content, pattern, self->header, privacy_syms, includes,
-            c_data, prefix, vt_bootstrap, vt_register, self->footer);
+            c_data, prefix, vt_bootstrap, vt_register, prefix, self->footer);
 
     // Unlink then open file.
     const char *src_dest = CFCHierarchy_get_source_dest(hierarchy);

Added: lucy/trunk/core/Lucy.c
URL: http://svn.apache.org/viewvc/lucy/trunk/core/Lucy.c?rev=1326107&view=auto
==============================================================================
--- lucy/trunk/core/Lucy.c (added)
+++ lucy/trunk/core/Lucy.c Sat Apr 14 14:05:15 2012
@@ -0,0 +1,20 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+void
+lucy_init_parcel() {
+}
+