Revision: 4128
http://geany.svn.sourceforge.net/geany/?rev=4128&view=rev
Author: ntrel
Date: 2009-08-26 14:56:05 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
Use GEANY_PRIVATE to hide some fields from plugins.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/Makefile.am
trunk/src/filetypes.h
trunk/src/keybindings.h
trunk/src/makefile.win32
trunk/src/project.h
trunk/wscript
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/ChangeLog 2009-08-26 14:56:05 UTC (rev 4128)
@@ -5,6 +5,9 @@
Add reference to HACKING for plugin API development.
* HACKING:
Add section 'Plugin API/ABI design'.
+ * src/keybindings.h, src/makefile.win32, src/project.h,
+ src/filetypes.h, src/Makefile.am, wscript:
+ Use GEANY_PRIVATE to hide some fields from plugins.
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/src/Makefile.am 2009-08-26 14:56:05 UTC (rev 4128)
@@ -96,7 +96,8 @@
-DGEANY_DOCDIR=\"\" \
-DGEANY_LIBDIR=\"\" \
-DGEANY_LOCALEDIR=\"\" \
- -DGEANY_PREFIX=\"\"
+ -DGEANY_PREFIX=\"\" \
+ -DGEANY_PRIVATE
geany_LDFLAGS = -mwindows -mms-bitfields
@@ -119,7 +120,8 @@
-DGEANY_DOCDIR=\""$(docdir)"\" \
-DGEANY_LIBDIR=\""$(libdir)"\" \
-DGEANY_LOCALEDIR=\""$(localedir)"\" \
- -DGEANY_PREFIX=\""$(prefix)"\"
+ -DGEANY_PREFIX=\""$(prefix)"\" \
+ -DGEANY_PRIVATE
clean-local:
Modified: trunk/src/filetypes.h
===================================================================
--- trunk/src/filetypes.h 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/src/filetypes.h 2009-08-26 14:56:05 UTC (rev 4128)
@@ -119,7 +119,7 @@
gchar *error_regex_string;
struct GeanyFiletypePrivate *priv; /* must be last, append fields before this item */
-
+#ifdef GEANY_PRIVATE
/* Do not use following fields in plugins */
GeanyBuildCommand *filecmds; /* these need to be visible since used in build.c so not in private part */
GeanyBuildCommand *ftdefcmds; /* filetype dependent defaults for non_ft commands */
@@ -130,6 +130,7 @@
gint project_list_entry;
gchar *projerror_regex_string;
gchar *homeerror_regex_string;
+#endif
};
extern GPtrArray *filetypes_array;
Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/src/keybindings.h 2009-08-26 14:56:05 UTC (rev 4128)
@@ -51,6 +51,7 @@
typedef struct GeanyKeyGroup GeanyKeyGroup;
/* Plugins should not set these fields. */
+#ifdef GEANY_PRIVATE
struct GeanyKeyGroup
{
const gchar *name; /* Group name used in the configuration file, such as @c "html_chars" */
@@ -59,6 +60,7 @@
GeanyKeyBinding *keys; /* array of GeanyKeyBinding structs */
gboolean plugin; /* used by plugin */
};
+#endif
extern GPtrArray *keybinding_groups; /* array of GeanyKeyGroup pointers */
Modified: trunk/src/makefile.win32
===================================================================
--- trunk/src/makefile.win32 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/src/makefile.win32 2009-08-26 14:56:05 UTC (rev 4128)
@@ -1,6 +1,7 @@
# Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
DEFINES = -DHAVE_CONFIG_H \
+ -DGEANY_PRIVATE \
-DGEANY_DATADIR=\"data\" \
-DGEANY_LOCALEDIR=\"\" \
-DGEANY_LIBDIR=\"\" \
Modified: trunk/src/project.h
===================================================================
--- trunk/src/project.h 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/src/project.h 2009-08-26 14:56:05 UTC (rev 4128)
@@ -41,9 +41,10 @@
gchar **file_patterns; /**< Array of filename extension patterns. */
struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
-
+#ifdef GEANY_PRIVATE
/* Do not use following fields in plugins */
GPtrArray *build_filetypes_list; /* *< Project has custom filetype builds for these. */
+#endif
}
GeanyProject;
Modified: trunk/wscript
===================================================================
--- trunk/wscript 2009-08-26 14:46:45 UTC (rev 4127)
+++ trunk/wscript 2009-08-26 14:56:05 UTC (rev 4128)
@@ -272,6 +272,8 @@
conf.env.append_value('CCFLAGS', '-g -DGEANY_DEBUG'.split())
conf.env.append_value('CCFLAGS', '-DHAVE_CONFIG_H')
+ # for now define GEANY_PRIVATE for all files, even though it should just be for src/*.
+ conf.env.append_value('CCFLAGS', '-DGEANY_PRIVATE')
# Scintilla flags
conf.env.append_value('CXXFLAGS',
'-DNDEBUG -DGTK -DGTK2 -DSCI_LEXER -DG_THREADS_IMPL_NONE'.split())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4127
http://geany.svn.sourceforge.net/geany/?rev=4127&view=rev
Author: ntrel
Date: 2009-08-26 14:46:45 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
Add section 'Plugin API/ABI design'.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-08-26 14:42:25 UTC (rev 4126)
+++ trunk/ChangeLog 2009-08-26 14:46:45 UTC (rev 4127)
@@ -3,6 +3,8 @@
* doc/plugins.dox:
Add warning about not using undocumented features.
Add reference to HACKING for plugin API development.
+ * HACKING:
+ Add section 'Plugin API/ABI design'.
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2009-08-26 14:42:25 UTC (rev 4126)
+++ trunk/HACKING 2009-08-26 14:46:45 UTC (rev 4127)
@@ -72,7 +72,7 @@
.. warning::
- Some structs like GeanyKeyGroup and GeanyCallback cannot be
+ Some structs like GeanyKeyGroupInfo and GeanyCallback cannot be
appended to without breaking the ABI because they are used to declare
structs by plugins, not just for accessing struct members through
a pointer.
@@ -82,7 +82,7 @@
not load and they must be rebuilt. An API change means that some plugins
might not build correctly.
-When reordering or changing existing elements of structs that are
+If you're reordering or changing existing elements of structs that are
used as part of the plugin API, you should increment GEANY_ABI_VERSION
in plugindata.h. This is usually not needed if you're just appending
fields to structs. The GEANY_API_VERSION value should be incremented
@@ -90,6 +90,15 @@
If you're in any doubt when making changes to plugin API code, just ask us.
+Plugin API/ABI design
+---------------------
+You should not make plugins rely on the size of a struct. This means:
+
+* Don't let plugins allocate any structs (stack or heap).
+* Don't let plugins index any arrays of structs.
+* Don't add any array fields to structs in case we want to change the
+ array size later.
+
Glade
-----
Use the code generation features of Glade instead of editing interface.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4126
http://geany.svn.sourceforge.net/geany/?rev=4126&view=rev
Author: ntrel
Date: 2009-08-26 14:42:25 +0000 (Wed, 26 Aug 2009)
Log Message:
-----------
Add warning about not using undocumented features.
Add reference to HACKING for plugin API development.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/plugins.dox
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-08-25 21:33:04 UTC (rev 4125)
+++ trunk/ChangeLog 2009-08-26 14:42:25 UTC (rev 4126)
@@ -1,3 +1,10 @@
+2009-08-26 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * doc/plugins.dox:
+ Add warning about not using undocumented features.
+ Add reference to HACKING for plugin API development.
+
+
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* tagmanager/php.c:
Modified: trunk/doc/plugins.dox
===================================================================
--- trunk/doc/plugins.dox 2009-08-25 21:33:04 UTC (rev 4125)
+++ trunk/doc/plugins.dox 2009-08-26 14:42:25 UTC (rev 4126)
@@ -29,26 +29,29 @@
/**
*
- * @mainpage Geany Plugin API Documentation
+ * @mainpage Geany Plugin API Documentation
*
- * @author Enrico Tröger, Nick Treleaven, Frank Lanitz
- * @date $Date$
+ * @author Enrico Tröger, Nick Treleaven, Frank Lanitz
+ * @date $Date$
*
- * @section Intro
- * This is the Geany API documentation. It is far from being complete and should be
- * considered as a work in progress.
- * We will try to document as many functions and structs as possible.
+ * @section Intro
+ * This is the Geany API documentation. It is far from being complete and should be
+ * considered as a work in progress.
+ * We will try to document as many functions and structs as possible.
*
- * To get started, see the @link howto Plugin Howto @endlink.
+ * To get started, see the @link howto Plugin Howto @endlink.
*
- * Other pages:
- * - @link pluginsymbols.c Plugin Symbols @endlink
- * - @link plugindata.h Main Datatypes and Macros @endlink
- * - @link signals Plugin Signals @endlink
- * - @link pluginutils.c Plugin Utility Functions @endlink
- * - @link guidelines Plugin Writing Guidelines @endlink
+ * Other pages:
+ * - @link pluginsymbols.c Plugin Symbols @endlink
+ * - @link plugindata.h Main Datatypes and Macros @endlink
+ * - @link signals Plugin Signals @endlink
+ * - @link pluginutils.c Plugin Utility Functions @endlink
+ * - @link guidelines Plugin Writing Guidelines @endlink
*
- * @note Some of these pages are also listed in Related Pages.
+ * @note Some of these pages are also listed in Related Pages, plus the list of deprecated symbols.
+ * @warning Do not use anything not documented here, it may change.
+ * @note You should see the HACKING file for information about developing the plugin API and
+ * other useful things.
*/
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Geany GTK 2.8 build test failed at: waf build
See http://nightly.geany.org/misc/build_gtk28_stderr.log for details.
Last error message:
../../gtk28_test/src/build.c:2347: warning: excess elements in scalar initializer
../../gtk28_test/src/build.c:2347: warning: (near initialization for 'default_cmds')
../../gtk28_test/src/build.c:2351: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
../../gtk28_test/src/build.c:2434: error: old-style parameter declarations in prototyped function definition
../../gtk28_test/src/build.c:2432: error: expected '{' at end of input
Build failed
-> task failed (err #1):
{task: cc build.c -> build_3.o}
http://nightly.geany.org/
Plugins Windows build failed at: waf build
See http://nightly.geany.org/win32/build_win32_plugins_stderr.log for details.
Last error message:
../../plugins_svn/geanylua/glspi_keycmd.h:135: error: (near initialization for `key_cmd_hash_entries[114]')
../../plugins_svn/geanylua/glspi_keycmd.h:136: error: initializer element is not constant
../../plugins_svn/geanylua/glspi_keycmd.h:136: error: (near initialization for `key_cmd_hash_entries[115]')
../../plugins_svn/geanylua/glspi_keycmd.h:137: error: initializer element is not constant
../../plugins_svn/geanylua/glspi_keycmd.h:137: error: (near initialization for `key_cmd_hash_entries[116]')
Build failed
-> task failed (err #1):
{task: cc glspi_app.c -> glspi_app_9.o}
http://nightly.geany.org/
Revision: 4125
http://geany.svn.sourceforge.net/geany/?rev=4125&view=rev
Author: eht16
Date: 2009-08-25 21:33:04 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
Don't parse comments after import statements and other tags (closes #2838938, patch by Huandari Lopez, thanks).
Modified Paths:
--------------
trunk/ChangeLog
trunk/tagmanager/python.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-08-25 21:23:14 UTC (rev 4124)
+++ trunk/ChangeLog 2009-08-25 21:33:04 UTC (rev 4125)
@@ -5,6 +5,9 @@
whitespace before the 'function' keyword to ignore some false
positives like function tags inside comments
(patch by Harold Aling, thanks).
+ * tagmanager/python.c:
+ Don't parse comments after import statements and other tags
+ (closes #2838938, patch by Huandari Lopez, thanks).
2009-08-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/tagmanager/python.c
===================================================================
--- trunk/tagmanager/python.c 2009-08-25 21:23:14 UTC (rev 4124)
+++ trunk/tagmanager/python.c 2009-08-25 21:33:04 UTC (rev 4125)
@@ -166,7 +166,7 @@
{
for (; *cp; cp++)
{
- if (*cp == '"' || *cp == '\'')
+ if (*cp == '"' || *cp == '\'' || *cp == '#')
{
cp = skipString(cp);
if (!*cp) break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.