Rename sip into sip-tqt in order to be conflict free with upstream.

This relates to bug 2699.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/2/head
gregory guy 3 years ago committed by Slávek Banko
parent c1d6f4a527
commit 976b20e043
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -1,17 +1,17 @@
# This script handles the SIP configuration and generates the Makefiles. # This script handles the SIP-TQt configuration and generates the Makefiles.
# #
# Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> # Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
# #
# This file is part of SIP. # This file is part of SIP-TQt.
# #
# This copy of SIP is licensed for use under the terms of the SIP License # This copy of SIP-TQt is licensed for use under the terms of the SIP License
# Agreement. See the file LICENSE for more details. # Agreement. See the file LICENSE for more details.
# #
# This copy of SIP may also used under the terms of the GNU General Public # This copy of SIP-TQt may also used under the terms of the GNU General Public
# License v2 or v3 as published by the Free Software Foundation which can be # License v2 or v3 as published by the Free Software Foundation which can be
# found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. # found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
# #
# SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of # SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@ -129,7 +129,7 @@ def set_defaults():
"cygwin": "cygwin-g++", "cygwin": "cygwin-g++",
"darwin": "macx-g++", "darwin": "macx-g++",
"dgux": "dgux-g++", "dgux": "dgux-g++",
"freebsd": "freebsd-g++", "freebsd": "freebsd-clang",
"gnu": "hurd-g++", "gnu": "hurd-g++",
"hp-ux": "hpux-acc", "hp-ux": "hpux-acc",
"irix": "irix-cc", "irix": "irix-cc",
@ -165,7 +165,7 @@ def set_defaults():
break break
default_sipbindir = plat_bin_dir default_sipbindir = plat_bin_dir
default_sipmoddir = os.path.join(plat_py_site_dir, 'sip4_tqt') default_sipmoddir = plat_py_site_dir
default_sipincdir = plat_py_inc_dir default_sipincdir = plat_py_inc_dir
default_sipsipdir = plat_sip_dir default_sipsipdir = plat_sip_dir
@ -173,9 +173,9 @@ def set_defaults():
def inform_user(): def inform_user():
"""Tell the user the option values that are going to be used. """Tell the user the option values that are going to be used.
""" """
siputils.inform("The SIP code generator will be installed in %s." % opts.sipbindir) siputils.inform("The SIP-TQt code generator will be installed in %s." % opts.sipbindir)
siputils.inform("The SIP module will be installed in %s." % opts.sipmoddir) siputils.inform("The SIP-TQt module will be installed in %s." % opts.sipmoddir)
siputils.inform("The SIP header file will be installed in %s." % opts.sipincdir) siputils.inform("The SIP-TQt header file will be installed in %s." % opts.sipincdir)
siputils.inform("The default directory to install .sip files in is %s." % opts.sipsipdir) siputils.inform("The default directory to install .sip files in is %s." % opts.sipsipdir)
siputils.inform("The platform/compiler configuration is %s." % opts.platform) siputils.inform("The platform/compiler configuration is %s." % opts.platform)
@ -201,17 +201,17 @@ def set_platform_directories():
if sys.platform == "win32": if sys.platform == "win32":
plat_py_lib_dir = sys.prefix + "\\libs" plat_py_lib_dir = sys.prefix + "\\libs"
plat_bin_dir = sys.exec_prefix plat_bin_dir = sys.exec_prefix
plat_sip_dir = sys.prefix + "\\sip" plat_sip_dir = sys.prefix + "\\sip-tqt"
else: else:
lib_dir = sysconfig.get_python_lib(plat_specific=1, standard_lib=1) lib_dir = sysconfig.get_python_lib(plat_specific=1, standard_lib=1)
plat_py_lib_dir = lib_dir + "/config" plat_py_lib_dir = lib_dir + "/config"
plat_bin_dir = sys.exec_prefix + "/bin" plat_bin_dir = sys.exec_prefix + "/bin"
plat_sip_dir = sys.prefix + "/share/sip" plat_sip_dir = sys.prefix + "/share/sip-tqt"
def create_config(module, template, macros): def create_config(module, template, macros):
"""Create the SIP configuration module so that it can be imported by build """Create the SIP-TQt configuration module so that it can be imported by build
scripts. scripts.
module is the module file name. module is the module file name.
@ -225,7 +225,7 @@ def create_config(module, template, macros):
"sip_version": sip_version, "sip_version": sip_version,
"sip_version_str": sip_version_str, "sip_version_str": sip_version_str,
"platform": opts.platform, "platform": opts.platform,
"sip_bin": os.path.join(opts.sipbindir, "sip"), "sip_bin": os.path.join(opts.sipbindir, "sip-tqt"),
"sip_inc_dir": opts.sipincdir, "sip_inc_dir": opts.sipincdir,
"sip_mod_dir": opts.sipmoddir, "sip_mod_dir": opts.sipmoddir,
"default_bin_dir": plat_bin_dir, "default_bin_dir": plat_bin_dir,
@ -249,26 +249,24 @@ def create_makefiles(macros, extra_lib_dir=None, extra_libs=None):
""" """
# Bootstrap. Make sure we get the right one. # Bootstrap. Make sure we get the right one.
sys.path.insert(0, os.path.curdir) sys.path.insert(0, os.path.curdir)
import sipconfig import sip_tqt_config
cfg = sipconfig.Configuration() cfg = sip_tqt_config.Configuration()
cfg.set_build_macros(macros) cfg.set_build_macros(macros)
sipconfig.inform("Creating top level Makefile...") sip_tqt_config.inform("Creating top level Makefile...")
open('__init__.py', 'a').close() sip_tqt_config.ParentMakefile(
sipconfig.ParentMakefile(
configuration=cfg, configuration=cfg,
subdirs=["sipgen", "siplib"], subdirs=["sipgen", "siplib"],
installs=(["__init__.py", "sipconfig.py", os.path.join(src_dir, "sipdistutils.py")], installs=(["sip_tqt_config.py", os.path.join(src_dir, "sip_tqt_distutils.py")],
cfg.sip_mod_dir) cfg.sip_mod_dir)
).generate() ).generate()
sipconfig.inform("Creating sip code generator Makefile...") sip_tqt_config.inform("Creating sip-tqt code generator Makefile...")
sipconfig.ProgramMakefile( sip_tqt_config.ProgramMakefile(
configuration=cfg, configuration=cfg,
build_file=os.path.join(src_dir, "sipgen", "sipgen.sbf"), build_file=os.path.join(src_dir, "sipgen", "sipgen.sbf"),
dir="sipgen", dir="sipgen",
@ -279,14 +277,14 @@ def create_makefiles(macros, extra_lib_dir=None, extra_libs=None):
arch=opts.arch arch=opts.arch
).generate() ).generate()
sipconfig.inform("Creating sip module Makefile...") sip_tqt_config.inform("Creating sip-tqt module Makefile...")
makefile = sipconfig.ModuleMakefile( makefile = sip_tqt_config.ModuleMakefile(
configuration=cfg, configuration=cfg,
build_file=os.path.join(src_dir, "siplib", "siplib.sbf"), build_file=os.path.join(src_dir, "siplib", "siplib.sbf"),
dir="siplib", dir="siplib",
install_dir=cfg.sip_mod_dir, install_dir=cfg.sip_mod_dir,
installs=([os.path.join(src_dir, "siplib", "sip.h")], cfg.sip_inc_dir), installs=([os.path.join(src_dir, "siplib", "sip-tqt.h")], cfg.sip_inc_dir),
console=1, console=1,
warnings=0, warnings=0,
static=opts.static, static=opts.static,
@ -315,7 +313,7 @@ def create_optparser():
# Note: we don't use %default to be compatible with Python 2.3. # Note: we don't use %default to be compatible with Python 2.3.
p.add_option("-k", "--static", action="store_true", default=False, p.add_option("-k", "--static", action="store_true", default=False,
dest="static", help="build the SIP module as a static library") dest="static", help="build the SIP-TQt module as a static library")
p.add_option("-p", "--platform", action="store", p.add_option("-p", "--platform", action="store",
default=default_platform, type="string", metavar="PLATFORM", default=default_platform, type="string", metavar="PLATFORM",
dest="platform", help="the platform/compiler configuration " dest="platform", help="the platform/compiler configuration "
@ -342,7 +340,7 @@ def create_optparser():
help="build for architecture ARCH") help="build for architecture ARCH")
g.add_option("-n", "--universal", action="store_true", default=False, g.add_option("-n", "--universal", action="store_true", default=False,
dest="universal", dest="universal",
help="build the SIP code generator and module as universal " help="build the SIP-TQt code generator and module as universal "
"binaries") "binaries")
g.add_option("-s", "--sdk", action="store", default=default_sdk, g.add_option("-s", "--sdk", action="store", default=default_sdk,
type="string", metavar="SDK", dest="sdk", type="string", metavar="SDK", dest="sdk",
@ -364,16 +362,16 @@ def create_optparser():
g = optparse.OptionGroup(p, title="Installation") g = optparse.OptionGroup(p, title="Installation")
g.add_option("-b", "--bindir", action="callback", g.add_option("-b", "--bindir", action="callback",
default=default_sipbindir, type="string", metavar="DIR", default=default_sipbindir, type="string", metavar="DIR",
dest="sipbindir", callback=store_abspath, help="where the SIP " dest="sipbindir", callback=store_abspath, help="where the SIP-TQt "
"code generator will be installed [default: %s]" % "code generator will be installed [default: %s]" %
default_sipbindir) default_sipbindir)
g.add_option("-d", "--destdir", action="callback", g.add_option("-d", "--destdir", action="callback",
default=default_sipmoddir, type="string", metavar="DIR", default=default_sipmoddir, type="string", metavar="DIR",
dest="sipmoddir", callback=store_abspath, help="where the SIP " dest="sipmoddir", callback=store_abspath, help="where the SIP-TQt "
"module will be installed [default: %s]" % default_sipmoddir) "module will be installed [default: %s]" % default_sipmoddir)
g.add_option("-e", "--incdir", action="callback", g.add_option("-e", "--incdir", action="callback",
default=default_sipincdir, type="string", metavar="DIR", default=default_sipincdir, type="string", metavar="DIR",
dest="sipincdir", callback=store_abspath, help="where the SIP " dest="sipincdir", callback=store_abspath, help="where the SIP-TQt "
"header file will be installed [default: %s]" % default_sipincdir) "header file will be installed [default: %s]" % default_sipincdir)
g.add_option("-v", "--sipdir", action="callback", g.add_option("-v", "--sipdir", action="callback",
default=default_sipsipdir, type="string", metavar="DIR", default=default_sipsipdir, type="string", metavar="DIR",
@ -389,10 +387,10 @@ def main(argv):
argv is the list of command line arguments. argv is the list of command line arguments.
""" """
siputils.inform("This is SIP %s for Python %s on %s." % (sip_version_str, sys.version.split()[0], sys.platform)) siputils.inform("This is SIP-TQt %s for Python %s on %s platform." % (sip_version_str, sys.version.split()[0], sys.platform))
if py_version < 0x020300: if py_version < 0x020300:
siputils.error("This version of SIP requires Python v2.3 or later.") siputils.error("This version of SIP-TQt requires Python v2.3 or later.")
global extra_lib_dir global extra_lib_dir
@ -467,7 +465,7 @@ def main(argv):
inform_user() inform_user()
# Install the configuration module. # Install the configuration module.
create_config("sipconfig.py", os.path.join(src_dir, "siputils.py"), create_config("sip_tqt_config.py", os.path.join(src_dir, "siputils.py"),
macros) macros)
# Create the Makefiles. # Create the Makefiles.

@ -14,11 +14,11 @@ int main(int argc, char **argv)
* to be a builtin in the custom interpreter. The name of the function * to be a builtin in the custom interpreter. The name of the function
* will be the name of the module with "init" prepended. The modules * will be the name of the module with "init" prepended. The modules
* must be built as static libraries (using the -k flag to configure.py * must be built as static libraries (using the -k flag to configure.py
* for SIP and PyTQt). * for SIP-TQt and PyTQt).
*/ */
/* The sip module will be builtin. */ /* The sip module will be builtin. */
extern void initsip(void); extern void initsip_tqt(void);
/* /*
* Uncomment these (and in the structure below) to include the PyTQt * Uncomment these (and in the structure below) to include the PyTQt
@ -40,7 +40,7 @@ int main(int argc, char **argv)
* the builtin modules. * the builtin modules.
*/ */
struct _inittab builtin_modules[] = { struct _inittab builtin_modules[] = {
{"sip", initsip}, {"sip_tqt", initsip_tqt},
/* {"qt", initqt},*/ /* {"qt", initqt},*/
/* {"qtaxcontainer", initqtaxcontainer},*/ /* {"qtaxcontainer", initqtaxcontainer},*/
/* {"qtcanvas", initqtcanvas},*/ /* {"qtcanvas", initqtcanvas},*/

@ -18,11 +18,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
* to be a builtin in the custom interpreter. The name of the function * to be a builtin in the custom interpreter. The name of the function
* will be the name of the module with "init" prepended. The modules * will be the name of the module with "init" prepended. The modules
* must be built as static libraries (using the -k flag to configure.py * must be built as static libraries (using the -k flag to configure.py
* for SIP and PyTQt). * for SIP-TQt and PyTQt).
*/ */
/* The sip module will be builtin. */ /* The sip module will be builtin. */
extern void initsip(void); extern void initsip_tqt(void);
/* /*
* Uncomment these (and in the structure below) to include the PyTQt * Uncomment these (and in the structure below) to include the PyTQt
@ -44,7 +44,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
* the builtin modules. * the builtin modules.
*/ */
struct _inittab builtin_modules[] = { struct _inittab builtin_modules[] = {
{"sip", initsip}, {"sip_tqt", initsip_tqt},
/* {"qt", initqt},*/ /* {"qt", initqt},*/
/* {"qtaxcontainer", initqtaxcontainer},*/ /* {"qtaxcontainer", initqtaxcontainer},*/
/* {"qtcanvas", initqtcanvas},*/ /* {"qtcanvas", initqtcanvas},*/

@ -1,4 +1,4 @@
"""This Python script uses the SIP build system to create a Makefile for """This Python script uses the SIP-TQt build system to create a Makefile for
building a custom Python interpreter. The script doesn't take any command line building a custom Python interpreter. The script doesn't take any command line
flags - just edit it to suit your needs. You will also need to edit custom.c flags - just edit it to suit your needs. You will also need to edit custom.c
or customw.c. or customw.c.
@ -6,11 +6,11 @@ or customw.c.
import sys import sys
import sipconfig import sip_tqt_config
# Get the SIP configuration. # Get the SIP-TQt configuration.
cfg = sipconfig.Configuration() cfg = sip_tqt_config.Configuration()
# This is the name of the interpreter executable (excluding any platform # This is the name of the interpreter executable (excluding any platform
@ -50,7 +50,7 @@ if sys.platform == "linux2":
# Create a dictionary describing the target and source files to be passed to # Create a dictionary describing the target and source files to be passed to
# the SIP build system. # the SIP-TQt build system.
build = {} build = {}
if sys.platform == "win32" and WindowsInterpreter: if sys.platform == "win32" and WindowsInterpreter:
@ -66,7 +66,7 @@ else:
qt = (cfg.qt_version > 0) qt = (cfg.qt_version > 0)
# Create the Makefile instance. # Create the Makefile instance.
mf = sipconfig.ProgramMakefile(cfg, build, python=True, console=console, qt=qt) mf = sip_tqt_config.ProgramMakefile(cfg, build, python=True, console=console, qt=qt)
# Modify the Makefile according to the values set above. # Modify the Makefile according to the values set above.
mf.extra_lib_dirs.extend(ExtraLibraryDirectories) mf.extra_lib_dirs.extend(ExtraLibraryDirectories)

@ -1,5 +1,5 @@
# Subclasses disutils.command.build_ext, # Subclasses disutils.command.build_ext,
# replacing it with a SIP version that compiles .sip -> .cpp # replacing it with a SIP-TQt version that compiles .sip -> .cpp
# before calling the original build_ext command. # before calling the original build_ext command.
# Written by Giovanni Bajo <rasky at develer dot com> # Written by Giovanni Bajo <rasky at develer dot com>
# Based on Pyrex.Distutils, written by Graham Fawcett and Darrel Gallion. # Based on Pyrex.Distutils, written by Graham Fawcett and Darrel Gallion.
@ -17,7 +17,7 @@ def replace_suffix(path, new_suffix):
class build_ext (build_ext_base): class build_ext (build_ext_base):
description = "Compiler SIP descriptions, then build C/C++ extensions (compile/link to build directory)" description = "Compiler SIP-TQt descriptions, then build C/C++ extensions (compile/link to build directory)"
user_options = build_ext_base.user_options[:] user_options = build_ext_base.user_options[:]
user_options = [opt for opt in user_options if not opt[0].startswith("swig")] user_options = [opt for opt in user_options if not opt[0].startswith("swig")]
@ -53,21 +53,21 @@ class build_ext (build_ext_base):
raise RuntimeError("cannot parse SIP-generated '%s'" % sbf) raise RuntimeError("cannot parse SIP-generated '%s'" % sbf)
def _find_sip(self): def _find_sip(self):
import sipconfig import sip_tqt_config
cfg = sipconfig.Configuration() cfg = sip_tqt_config.Configuration()
if os.name == "nt": if os.name == "nt":
if not os.path.splitext(os.path.basename(cfg.sip_bin))[1]: if not os.path.splitext(os.path.basename(cfg.sip_bin))[1]:
return cfg.sip_bin + ".exe" return cfg.sip_bin + ".exe"
return cfg.sip_bin return cfg.sip_bin
def _sip_inc_dir(self): def _sip_inc_dir(self):
import sipconfig import sip_tqt_config
cfg = sipconfig.Configuration() cfg = sip_tqt_config.Configuration()
return cfg.sip_inc_dir return cfg.sip_inc_dir
def _sip_sipfiles_dir(self): def _sip_sipfiles_dir(self):
import sipconfig import sip_tqt_config
cfg = sipconfig.Configuration() cfg = sip_tqt_config.Configuration()
return cfg.default_sip_dir return cfg.default_sip_dir
def _sip_calc_signature(self): def _sip_calc_signature(self):
@ -100,7 +100,7 @@ class build_ext (build_ext_base):
if not self.extensions: if not self.extensions:
return return
# Add the SIP include directory to the include path # Add the SIP-TQt include directory to the include path
if extension is not None: if extension is not None:
extension.include_dirs.append(self._sip_inc_dir()) extension.include_dirs.append(self._sip_inc_dir())
depends = extension.depends depends = extension.depends

@ -1,18 +1,18 @@
/* /*
* The code generator module for SIP. * The code generator module for SIP-TQt.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -496,11 +496,11 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
"#define _%sAPI_H\n" "#define _%sAPI_H\n"
"\n" "\n"
"\n" "\n"
"#include <sip.h>\n" "#include <sip-tqt.h>\n"
, mname , mname
, mname); , mname);
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
prcode(fp, prcode(fp,
"\n" "\n"
"#include <TQMetaType>\n" "#include <TQMetaType>\n"
@ -787,7 +787,7 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
prcode(fp, prcode(fp,
"\n" "\n"
"/* The SIP API, this module's API and the APIs of any imported modules. */\n" "/* The SIP-TQt API, this module's API and the APIs of any imported modules. */\n"
"extern const sipAPIDef *sipAPI_%s;\n" "extern const sipAPIDef *sipAPI_%s;\n"
"extern sipExportedModuleDef sipModuleAPI_%s;\n" "extern sipExportedModuleDef sipModuleAPI_%s;\n"
, mname , mname
@ -802,7 +802,7 @@ static void generateInternalAPIHeader(sipSpec *pt, moduleDef *mod,
, mname, mld->module->name); , mname, mld->module->name);
} }
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
prcode(fp, prcode(fp,
"\n" "\n"
"typedef const TQMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n" "typedef const TQMetaObject *(*sip_qt_metaobject_func)(sipSimpleWrapper *,sipTypeDef *);\n"
@ -1817,7 +1817,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
"/* This defines this module. */\n" "/* This defines this module. */\n"
"sipExportedModuleDef sipModuleAPI_%s = {\n" "sipExportedModuleDef sipModuleAPI_%s = {\n"
" 0,\n" " 0,\n"
" SIP_API_MINOR_NR,\n" " SIP_TQT_API_MINOR_NR,\n"
" %n,\n" " %n,\n"
" 0,\n" " 0,\n"
" %d,\n" " %d,\n"
@ -1880,7 +1880,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
prcode(fp, prcode(fp,
"\n" "\n"
"\n" "\n"
"/* The SIP API and the APIs of any imported modules. */\n" "/* The SIP-TQt API and the APIs of any imported modules. */\n"
"const sipAPIDef *sipAPI_%s;\n" "const sipAPIDef *sipAPI_%s;\n"
, mname); , mname);
@ -1889,7 +1889,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
"const sipExportedModuleDef *sipModuleAPI_%s_%s;\n" "const sipExportedModuleDef *sipModuleAPI_%s_%s;\n"
, mname, mld->module->name); , mname, mld->module->name);
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
prcode(fp, prcode(fp,
"\n" "\n"
"sip_qt_metaobject_func sip_%s_qt_metaobject;\n" "sip_qt_metaobject_func sip_%s_qt_metaobject;\n"
@ -2006,7 +2006,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
prcode(fp, prcode(fp,
" /* Export the module and publish it's API. */\n" " /* Export the module and publish it's API. */\n"
" if (sipExportModule(&sipModuleAPI_%s,SIP_API_MAJOR_NR,SIP_API_MINOR_NR,0) < 0)\n" " if (sipExportModule(&sipModuleAPI_%s,SIP_TQT_API_MAJOR_NR,SIP_TQT_API_MINOR_NR,0) < 0)\n"
" {\n" " {\n"
"#if !defined(SIP_USE_PYCAPSULE)\n" "#if !defined(SIP_USE_PYCAPSULE)\n"
" Py_DECREF(sip_sipmod);\n" " Py_DECREF(sip_sipmod);\n"
@ -2016,7 +2016,7 @@ static void generateCpp(sipSpec *pt, moduleDef *mod, const char *codeDir,
" }\n" " }\n"
, mname); , mname);
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
{ {
/* Import the helpers. */ /* Import the helpers. */
prcode(fp, prcode(fp,
@ -2161,7 +2161,7 @@ static void generateTypesTable(sipSpec *pt, moduleDef *mod, FILE *fp)
argDef *ad; argDef *ad;
const char *type_suffix; const char *type_suffix;
type_suffix = (pluginPyTQt4(pt) || pluginPyTQt3(pt)) ? ".super" : ""; type_suffix = (pluginPyQt4(pt) || pluginPyTQt3(pt)) ? ".super" : "";
prcode(fp, prcode(fp,
"\n" "\n"
@ -2214,18 +2214,18 @@ static void generateTypesTable(sipSpec *pt, moduleDef *mod, FILE *fp)
static void generateSipImport(moduleDef *mod, FILE *fp) static void generateSipImport(moduleDef *mod, FILE *fp)
{ {
prcode(fp, prcode(fp,
" /* Get the SIP module's API. */\n" " /* Get the SIP-TQt module's API. */\n"
"#if defined(SIP_USE_PYCAPSULE)\n" "#if defined(SIP_USE_PYCAPSULE)\n"
"\n" "\n"
); );
if (generating_c) if (generating_c)
prcode(fp, prcode(fp,
" sipAPI_%s = (const sipAPIDef *)PyCapsule_Import(\"sip._C_API\", 0);\n" " sipAPI_%s = (const sipAPIDef *)PyCapsule_Import(\"sip_tqt._C_API\", 0);\n"
, mod->name); , mod->name);
else else
prcode(fp, prcode(fp,
" sipAPI_%s = reinterpret_cast<const sipAPIDef *>(PyCapsule_Import(\"sip._C_API\", 0));\n" " sipAPI_%s = reinterpret_cast<const sipAPIDef *>(PyCapsule_Import(\"sip_tqt._C_API\", 0));\n"
, mod->name); , mod->name);
prcode(fp, prcode(fp,
@ -2239,17 +2239,17 @@ static void generateSipImport(moduleDef *mod, FILE *fp)
"#else\n" "#else\n"
"\n" "\n"
"#if PY_VERSION_HEX >= 0x02050000\n" "#if PY_VERSION_HEX >= 0x02050000\n"
" sip_sipmod = PyImport_ImportModule(\"sip\");\n" " sip_sipmod = PyImport_ImportModule(\"sip_tqt\");\n"
"#else\n" "#else\n"
, mod->name); , mod->name);
if (generating_c) if (generating_c)
prcode(fp, prcode(fp,
" sip_sipmod = PyImport_ImportModule((char *)\"sip\");\n" " sip_sipmod = PyImport_ImportModule((char *)\"sip_tqt\");\n"
); );
else else
prcode(fp, prcode(fp,
" sip_sipmod = PyImport_ImportModule(const_cast<char *>(\"sip\"));\n" " sip_sipmod = PyImport_ImportModule(const_cast<char *>(\"sip_tqt\"));\n"
); );
prcode(fp, prcode(fp,
@ -2911,7 +2911,7 @@ static int generateClasses(sipSpec *pt, moduleDef *mod, classDef *cd, FILE *fp)
* code rather than through a static table. This is because C++ does * code rather than through a static table. This is because C++ does
* not guarantee the order in which the table and the instance will be * not guarantee the order in which the table and the instance will be
* created. So far this has only been seen to be a problem when * created. So far this has only been seen to be a problem when
* statically linking SIP generated modules on Windows. * statically linking SIP-TQt generated modules on Windows.
*/ */
if (!generating_c && vd->accessfunc == NULL && vd->type.nrderefs == 0) if (!generating_c && vd->accessfunc == NULL && vd->type.nrderefs == 0)
continue; continue;
@ -3816,7 +3816,7 @@ static void generateTypeDefLink(sipSpec *pt, ifaceFileDef *iff, FILE *fp)
if (iff->next_alt->type == mappedtype_iface) if (iff->next_alt->type == mappedtype_iface)
prcode(fp, ".mtd_base"); prcode(fp, ".mtd_base");
else if (pluginPyTQt3(pt) || pluginPyTQt4(pt)) else if (pluginPyTQt3(pt) || pluginPyQt4(pt))
prcode(fp, ".super.ctd_base"); prcode(fp, ".super.ctd_base");
else else
prcode(fp, ".ctd_base"); prcode(fp, ".ctd_base");
@ -6066,9 +6066,9 @@ static void generateShadowCode(sipSpec *pt, moduleDef *mod, classDef *cd,
} }
/* The meta methods if required. */ /* The meta methods if required. */
if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) if (pluginPyQt4(pt) && isTQObjectSubClass(cd))
{ {
if (!noPyTQt4TQMetaObject(cd)) if (!noPyQt4TQMetaObject(cd))
prcode(fp, prcode(fp,
"\n" "\n"
"const TQMetaObject *sip%C::metaObject() const\n" "const TQMetaObject *sip%C::metaObject() const\n"
@ -8022,7 +8022,7 @@ static void generateClassAPI(classDef *cd, sipSpec *pt, FILE *fp)
{ {
const char *type_prefix; const char *type_prefix;
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
type_prefix = "pyqt4"; type_prefix = "pyqt4";
else if (pluginPyTQt3(pt)) else if (pluginPyTQt3(pt))
type_prefix = "pyqt3"; type_prefix = "pyqt3";
@ -8179,7 +8179,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
,(cd->vmembers != NULL ? "virtual " : ""),classFTQCName(cd),cd->dtorexceptions); ,(cd->vmembers != NULL ? "virtual " : ""),classFTQCName(cd),cd->dtorexceptions);
/* The metacall methods if required. */ /* The metacall methods if required. */
if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) if (pluginPyQt4(pt) && isTQObjectSubClass(cd))
{ {
prcode(fp, prcode(fp,
"\n" "\n"
@ -8187,7 +8187,7 @@ static void generateShadowClassDeclaration(sipSpec *pt,classDef *cd,FILE *fp)
" void *qt_metacast(const char *);\n" " void *qt_metacast(const char *);\n"
); );
if (!noPyTQt4TQMetaObject(cd)) if (!noPyQt4TQMetaObject(cd))
prcode(fp, prcode(fp,
" const TQMetaObject *metaObject() const;\n" " const TQMetaObject *metaObject() const;\n"
); );
@ -8986,10 +8986,10 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
nr_methods = generateClassMethodTable(pt, cd, fp); nr_methods = generateClassMethodTable(pt, cd, fp);
nr_enums = generateEnumMemberTable(pt, mod, cd, NULL, fp); nr_enums = generateEnumMemberTable(pt, mod, cd, NULL, fp);
/* Generate the PyTQt4 signals table. */ /* Generate the PyQt4 signals table. */
is_signals = FALSE; is_signals = FALSE;
if (pluginPyTQt4(pt) && isTQObjectSubClass(cd)) if (pluginPyQt4(pt) && isTQObjectSubClass(cd))
{ {
/* The signals must be grouped by name. */ /* The signals must be grouped by name. */
for (md = cd->members; md != NULL; md = md->next) for (md = cd->members; md != NULL; md = md->next)
@ -9025,7 +9025,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
prcode(fp, prcode(fp,
"\n" "\n"
"\n" "\n"
"/* Define this type's PyTQt4 signals. */\n" "/* Define this type's PyQt4 signals. */\n"
"static const pyqt4QtSignal pyqt4_signals_%C[] = {\n" "static const pyqt4QtSignal pyqt4_signals_%C[] = {\n"
, classFTQCName(cd)); , classFTQCName(cd));
} }
@ -9135,7 +9135,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
has_docstring = TRUE; has_docstring = TRUE;
} }
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
{ {
type_prefix = "pyqt4"; type_prefix = "pyqt4";
embedded = TRUE; embedded = TRUE;
@ -9540,9 +9540,9 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
); );
} }
if (pluginPyTQt4(pt)) if (pluginPyQt4(pt))
{ {
if (isTQObjectSubClass(cd) && !noPyTQt4TQMetaObject(cd)) if (isTQObjectSubClass(cd) && !noPyQt4TQMetaObject(cd))
prcode(fp, prcode(fp,
" &%U::staticMetaObject,\n" " &%U::staticMetaObject,\n"
, cd); , cd);
@ -9572,7 +9572,7 @@ static void generateTypeDefinition(sipSpec *pt, classDef *cd, FILE *fp)
/* /*
* Generate an entry in the PyTQt4 signal table. * Generate an entry in the PyQt4 signal table.
*/ */
static void generateSignalTableEntry(sipSpec *pt, classDef *cd, overDef *sig, static void generateSignalTableEntry(sipSpec *pt, classDef *cd, overDef *sig,
memberDef *md, int membernr, FILE *fp) memberDef *md, int membernr, FILE *fp)
@ -12697,7 +12697,7 @@ static FILE *createFile(moduleDef *mod, const char *fname,
"/*\n" "/*\n"
" * %s\n" " * %s\n"
" *\n" " *\n"
" * Generated by SIP %s on %s" " * Generated by SIP-TQt %s on %s"
,description ,description
,sipVersion,ctime(&now)); ,sipVersion,ctime(&now));

@ -3,16 +3,16 @@
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */

@ -1,18 +1,18 @@
/* /*
* The SIP lexer. * The SIP-TQt lexer.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */

@ -1,18 +1,18 @@
/* /*
* The main module for SIP. * The main module for SIP-TQt.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -27,7 +27,7 @@
#ifndef PACKAGE #ifndef PACKAGE
#define PACKAGE "sip" #define PACKAGE "sip-tqt"
#endif #endif
#define VERSION "4.10.5" #define VERSION "4.10.5"
@ -460,7 +460,7 @@ void fatal(char *fmt,...)
/* /*
* Display the SIP version number on stdout and exit with zero exit status. * Display the SIP-TQt version number on stdout and exit with zero exit status.
*/ */
static void version(void) static void version(void)
{ {

@ -3266,7 +3266,7 @@ static void finishClass(sipSpec *pt, moduleDef *mod, classDef *cd,
cd->pyqt4_flags = flg->fvalue.ival; cd->pyqt4_flags = flg->fvalue.ival;
if (findOptFlag(of, "PyQt4NoQMetaObject", bool_flag) != NULL) if (findOptFlag(of, "PyQt4NoQMetaObject", bool_flag) != NULL)
setPyTQt4NoTQMetaObject(cd); setPyQt4NoTQMetaObject(cd);
if (isOpaque(cd)) if (isOpaque(cd))
{ {
@ -6071,7 +6071,7 @@ int pluginPyTQt3(sipSpec *pt)
/* /*
* Return TRUE if the PyQt4 plugin was specified. * Return TRUE if the PyQt4 plugin was specified.
*/ */
int pluginPyTQt4(sipSpec *pt) int pluginPyQt4(sipSpec *pt)
{ {
return stringFind(pt->plugins, "PyQt4"); return stringFind(pt->plugins, "PyQt4");
} }

@ -1,18 +1,18 @@
/* /*
* The main header file for SIP. * The main header file for SIP-TQt.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -137,8 +137,8 @@
#define setIsHoldGILDtor(cd) ((cd)->classflags |= CLASS_DTOR_HOLD_GIL) #define setIsHoldGILDtor(cd) ((cd)->classflags |= CLASS_DTOR_HOLD_GIL)
#define assignmentHelper(cd) ((cd)->classflags & CLASS_ASSIGN_HELPER) #define assignmentHelper(cd) ((cd)->classflags & CLASS_ASSIGN_HELPER)
#define setAssignmentHelper(cd) ((cd)->classflags |= CLASS_ASSIGN_HELPER) #define setAssignmentHelper(cd) ((cd)->classflags |= CLASS_ASSIGN_HELPER)
#define noPyTQt4TQMetaObject(cd) ((cd)->classflags & CLASS_NO_TQMETAOBJECT) #define noPyQt4TQMetaObject(cd) ((cd)->classflags & CLASS_NO_TQMETAOBJECT)
#define setPyTQt4NoTQMetaObject(cd) ((cd)->classflags |= CLASS_NO_TQMETAOBJECT) #define setPyQt4NoTQMetaObject(cd) ((cd)->classflags |= CLASS_NO_TQMETAOBJECT)
#define isTemplateClass(cd) ((cd)->classflags & CLASS_IS_TEMPLATE) #define isTemplateClass(cd) ((cd)->classflags & CLASS_IS_TEMPLATE)
#define setIsTemplateClass(cd) ((cd)->classflags |= CLASS_IS_TEMPLATE) #define setIsTemplateClass(cd) ((cd)->classflags |= CLASS_IS_TEMPLATE)
#define resetIsTemplateClass(cd) ((cd)->classflags &= ~CLASS_IS_TEMPLATE) #define resetIsTemplateClass(cd) ((cd)->classflags &= ~CLASS_IS_TEMPLATE)
@ -989,7 +989,7 @@ typedef struct _mroDef {
typedef struct _classDef { typedef struct _classDef {
int classflags; /* The class flags. */ int classflags; /* The class flags. */
int pyqt4_flags; /* The PyTQt4 specific flags. */ int pyqt4_flags; /* The PyQt4 specific flags. */
nameDef *pyname; /* The Python name. */ nameDef *pyname; /* The Python name. */
ifaceFileDef *iff; /* The interface file. */ ifaceFileDef *iff; /* The interface file. */
struct _classDef *ecd; /* The enclosing scope. */ struct _classDef *ecd; /* The enclosing scope. */
@ -1085,8 +1085,8 @@ typedef struct _parserContext {
} parserContext; } parserContext;
extern char *sipVersion; /* The version of SIP. */ extern char *sipVersion; /* The version of SIP-TQt. */
extern stringList *includeDirList; /* The include directory list for SIP files. */ extern stringList *includeDirList; /* The include directory list for SIP-TQt files. */
void parse(sipSpec *, FILE *, char *, stringList *, stringList *, int, int); void parse(sipSpec *, FILE *, char *, stringList *, stringList *, int, int);
@ -1140,7 +1140,7 @@ ifaceFileDef *findIfaceFile(sipSpec *pt, moduleDef *mod,
scopedNameDef *fqname, ifaceFileType iftype, scopedNameDef *fqname, ifaceFileType iftype,
apiVersionRangeDef *api_range, argDef *ad); apiVersionRangeDef *api_range, argDef *ad);
int pluginPyTQt3(sipSpec *pt); int pluginPyTQt3(sipSpec *pt);
int pluginPyTQt4(sipSpec *pt); int pluginPyQt4(sipSpec *pt);
void yywarning(char *); void yywarning(char *);
nameDef *cacheName(sipSpec *pt, const char *name); nameDef *cacheName(sipSpec *pt, const char *name);
scopedNameDef *encodedTemplateName(templateDef *td); scopedNameDef *encodedTemplateName(templateDef *td);

@ -2,18 +2,18 @@
# #
# Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> # Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
# #
# This file is part of SIP. # This file is part of SIP-TQt.
# #
# This copy of SIP is licensed for use under the terms of the SIP License # This copy of SIP-TQt is licensed for use under the terms of the SIP License
# Agreement. See the file LICENSE for more details. # Agreement. See the file LICENSE for more details.
# #
# This copy of SIP may also used under the terms of the GNU General Public # This copy of SIP-TQt may also used under the terms of the GNU General Public
# License v2 or v3 as published by the Free Software Foundation which can be # License v2 or v3 as published by the Free Software Foundation which can be
# found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. # found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
# #
# SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of # SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
target = sip target = sip-tqt
sources = main.c transform.c gencode.c export.c heap.c parser.c lexer.c sources = main.c transform.c gencode.c export.c heap.c parser.c lexer.c
headers = sip.h parser.h headers = sip.h parser.h

@ -1,18 +1,18 @@
/* /*
* The parse tree transformation module for SIP. * The parse tree transformation module for SIP-TQt.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */

@ -3,16 +3,16 @@
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -21,7 +21,7 @@
#include <string.h> #include <string.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"

@ -2,16 +2,16 @@
// //
// Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> // Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
// //
// This file is part of SIP. // This file is part of SIP-TQt.
// //
// This copy of SIP is licensed for use under the terms of the SIP License // This copy of SIP-TQt is licensed for use under the terms of the SIP License
// Agreement. See the file LICENSE for more details. // Agreement. See the file LICENSE for more details.
// //
// This copy of SIP may also used under the terms of the GNU General Public // This copy of SIP-TQt may also used under the terms of the GNU General Public
// License v2 or v3 as published by the Free Software Foundation which can be // License v2 or v3 as published by the Free Software Foundation which can be
// found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. // found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
// //
// SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of // SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

@ -3,23 +3,23 @@
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include <Python.h> #include <Python.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"
@ -51,7 +51,7 @@ typedef struct _sipMethodDescr {
*/ */
PyTypeObject sipMethodDescr_Type = { PyTypeObject sipMethodDescr_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"sip.methoddescriptor", /* tp_name */ "sip_tqt.methoddescriptor", /* tp_name */
sizeof (sipMethodDescr), /* tp_basicsize */ sizeof (sipMethodDescr), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
@ -168,7 +168,7 @@ typedef struct _sipVariableDescr {
*/ */
PyTypeObject sipVariableDescr_Type = { PyTypeObject sipVariableDescr_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"sip.variabledescriptor", /* tp_name */ "sip_tqt.variabledescriptor", /* tp_name */
sizeof (sipVariableDescr), /* tp_basicsize */ sizeof (sipVariableDescr), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */

@ -4,23 +4,23 @@
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include <string.h> #include <string.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"

@ -1,24 +1,24 @@
/* /*
* The SIP module interface. * The SIP-TQt module interface.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#ifndef _SIP_H #ifndef _SIP_TQT_H
#define _SIP_H #define _SIP_TQT_H
/* /*
@ -47,19 +47,19 @@ extern "C" {
/* Sanity check on the Python version. */ /* Sanity check on the Python version. */
#if PY_VERSION_HEX < 0x02030000 #if PY_VERSION_HEX < 0x02030000
#error "This version of SIP requires Python v2.3 or later" #error "This version of SIP-TQt requires Python v2.3 or later"
#endif #endif
/* /*
* Define the SIP version number. * Define the SIP-TQt version number.
*/ */
#define SIP_VERSION 0x040a05 #define SIP_TQT_VERSION 0x040a05
#define SIP_VERSION_STR "4.10.5" #define SIP_TQT_VERSION_STR "4.10.5"
/* /*
* Define the current API version number. SIP must handle modules with the * Define the current API version number. SIP-TQt must handle modules with the
* same major number and with the same or earlier minor number. Whenever data * same major number and with the same or earlier minor number. Whenever data
* structure elements are added they must be appended and the minor number * structure elements are added they must be appended and the minor number
* incremented. Whenever data structure elements are removed or the order * incremented. Whenever data structure elements are removed or the order
@ -168,11 +168,11 @@ extern "C" {
* *
* 0.0 Original version. * 0.0 Original version.
*/ */
#define SIP_API_MAJOR_NR 7 #define SIP_TQT_API_MAJOR_NR 7
#define SIP_API_MINOR_NR 1 #define SIP_TQT_API_MINOR_NR 1
/* Some compatibility stuff to help with handwritten code for SIP v3. */ /* Some compatibility stuff to help with handwritten code for SIP-TQt v3. */
#if !defined(ANY) #if !defined(ANY)
#define ANY void #define ANY void
#endif #endif
@ -909,7 +909,7 @@ typedef struct _sipExportedModuleDef {
/* The next in the list. */ /* The next in the list. */
struct _sipExportedModuleDef *em_next; struct _sipExportedModuleDef *em_next;
/* The SIP API minor version number. */ /* The SIP-TQt API minor version number. */
unsigned em_api_minor; unsigned em_api_minor;
/* The module name. */ /* The module name. */
@ -1217,7 +1217,7 @@ typedef struct _sipSlot {
/* /*
* The API exported by the SIP module, ie. pointers to all the data and * The API exported by the SIP-TQt module, ie. pointers to all the data and
* functions that can be used by generated code. * functions that can be used by generated code.
*/ */
typedef struct _sipAPIDef { typedef struct _sipAPIDef {
@ -1495,7 +1495,7 @@ typedef struct _sipTQtAPI {
/* /*
* The following are PyTQt3-specific extensions. In SIP v5 they will be pushed * The following are PyTQt3-specific extensions. In SIP-TQt v5 they will be pushed
* out to a plugin supplied by PyTQt3. * out to a plugin supplied by PyTQt3.
*/ */
@ -1530,12 +1530,12 @@ typedef struct _pyqt3ClassTypeDef {
/* /*
* The following are PyTQt4-specific extensions. In SIP v5 they will be pushed * The following are PyQt4-specific extensions. In SIP-TQt v5 they will be pushed
* out to a plugin supplied by PyTQt4. * out to a plugin supplied by PyQt4.
*/ */
/* /*
* The description of a TQt signal for PyTQt4. * The description of a TQt signal for PyQt4.
*/ */
typedef struct _pyqt4QtSignal { typedef struct _pyqt4QtSignal {
/* The C++ name and signature of the signal. */ /* The C++ name and signature of the signal. */
@ -1553,7 +1553,7 @@ typedef struct _pyqt4QtSignal {
/* /*
* This is the PyTQt4-specific extension to the generated class type structure. * This is the PyQt4-specific extension to the generated class type structure.
*/ */
typedef struct _pyqt4ClassTypeDef { typedef struct _pyqt4ClassTypeDef {
/* /*
@ -1562,12 +1562,12 @@ typedef struct _pyqt4ClassTypeDef {
*/ */
sipClassTypeDef super; sipClassTypeDef super;
/* A pointer to the TQObject sub-class's staticMetaObject class variable. */ /* A pointer to the QObject sub-class's staticMetaObject class variable. */
const void *qt4_static_metaobject; const void *qt4_static_metaobject;
/* /*
* A set of flags. At the moment only bit 0 is used to say if the type is * A set of flags. At the moment only bit 0 is used to say if the type is
* derived from TQFlags. * derived from QFlags.
*/ */
unsigned qt4_flags; unsigned qt4_flags;

@ -1,18 +1,18 @@
/* /*
* This file defines the SIP library internal interfaces. * This file defines the SIP-TQt library internal interfaces.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -102,7 +102,7 @@ PyObject *sip_api_disconnect_rx(PyObject *txObj, const char *sig,
/* /*
* These are part of the SIP API but are also used within the SIP module. * These are part of the SIP-TQt API but are also used within the SIP-TQt module.
*/ */
void *sip_api_malloc(size_t nbytes); void *sip_api_malloc(size_t nbytes);
void sip_api_free(void *mem); void sip_api_free(void *mem);
@ -121,7 +121,7 @@ int sip_api_save_slot(sipSlot *sp, PyObject *rxObj, const char *slot);
/* /*
* These are not part of the SIP API but are used within the SIP module. * These are not part of the SIP-TQt API but are used within the SIP-TQt module.
*/ */
void sipSaveMethod(sipPyMethod *pm,PyObject *meth); void sipSaveMethod(sipPyMethod *pm,PyObject *meth);
void *sipGetPending(sipWrapper **op, int *fp); void *sipGetPending(sipWrapper **op, int *fp);

@ -1,18 +1,18 @@
/* /*
* SIP library code. * SIP-TQt library code.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -25,7 +25,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"
@ -51,7 +51,7 @@ static int sipWrapperType_setattro(PyObject *self, PyObject *name,
static PyTypeObject sipWrapperType_Type = { static PyTypeObject sipWrapperType_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"sip.wrappertype", /* tp_name */ "sip_tqt.wrappertype", /* tp_name */
sizeof (sipWrapperType), /* tp_basicsize */ sizeof (sipWrapperType), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
@ -107,7 +107,7 @@ static sipWrapperType sipWrapper_Type = {
#endif #endif
{ {
PyVarObject_HEAD_INIT(&sipWrapperType_Type, 0) PyVarObject_HEAD_INIT(&sipWrapperType_Type, 0)
"sip.wrapper", /* tp_name */ "sip_tqt.wrapper", /* tp_name */
sizeof (sipWrapper), /* tp_basicsize */ sizeof (sipWrapper), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)sipWrapper_dealloc, /* tp_dealloc */ (destructor)sipWrapper_dealloc, /* tp_dealloc */
@ -254,7 +254,7 @@ static void sip_api_add_exception(sipErrorState es, PyObject **parseErrp);
/* /*
* The data structure that represents the SIP API. * The data structure that represents the SIP-TQt API.
*/ */
static const sipAPIDef sip_api = { static const sipAPIDef sip_api = {
/* This must be first. */ /* This must be first. */
@ -453,7 +453,7 @@ static PyObject *sipEnumType_alloc(PyTypeObject *self, SIP_SSIZE_T nitems);
*/ */
static PyTypeObject sipEnumType_Type = { static PyTypeObject sipEnumType_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"sip.enumtype", /* tp_name */ "sip_tqt.enumtype", /* tp_name */
sizeof (sipEnumTypeObject), /* tp_basicsize */ sizeof (sipEnumTypeObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
@ -654,13 +654,13 @@ static PyObject *bad_type_str(int arg_nr, PyObject *arg);
* The Python module initialisation function. * The Python module initialisation function.
*/ */
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
#define SIP_MODULE_ENTRY PyInit_sip #define SIP_MODULE_ENTRY PyInit_sip_tqt
#define SIP_MODULE_TYPE PyObject * #define SIP_MODULE_TYPE PyObject *
#define SIP_MODULE_DISCARD(m) Py_DECREF(m) #define SIP_MODULE_DISCARD(m) Py_DECREF(m)
#define SIP_FATAL(s) return NULL #define SIP_FATAL(s) return NULL
#define SIP_MODULE_RETURN(m) return (m) #define SIP_MODULE_RETURN(m) return (m)
#else #else
#define SIP_MODULE_ENTRY initsip #define SIP_MODULE_ENTRY initsip_tqt
#define SIP_MODULE_TYPE void #define SIP_MODULE_TYPE void
#define SIP_MODULE_DISCARD(m) #define SIP_MODULE_DISCARD(m)
#define SIP_FATAL(s) Py_FatalError(s) #define SIP_FATAL(s) Py_FatalError(s)
@ -695,7 +695,7 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
static PyModuleDef module_def = { static PyModuleDef module_def = {
PyModuleDef_HEAD_INIT, PyModuleDef_HEAD_INIT,
"sip", /* m_name */ "sip_tqt", /* m_name */
NULL, /* m_doc */ NULL, /* m_doc */
-1, /* m_size */ -1, /* m_size */
methods, /* m_methods */ methods, /* m_methods */
@ -717,13 +717,13 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
sipWrapperType_Type.tp_base = &PyType_Type; sipWrapperType_Type.tp_base = &PyType_Type;
if (PyType_Ready(&sipWrapperType_Type) < 0) if (PyType_Ready(&sipWrapperType_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.wrappertype type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.wrappertype type");
if (PyType_Ready((PyTypeObject *)&sipSimpleWrapper_Type) < 0) if (PyType_Ready((PyTypeObject *)&sipSimpleWrapper_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.simplewrapper type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.simplewrapper type");
if (sip_api_register_py_type((PyTypeObject *)&sipSimpleWrapper_Type) < 0) if (sip_api_register_py_type((PyTypeObject *)&sipSimpleWrapper_Type) < 0)
SIP_FATAL("sip: Failed to register sip.simplewrapper type"); SIP_FATAL("sip-tqt: Failed to register sip_tqt.simplewrapper type");
#if defined(STACKLESS) #if defined(STACKLESS)
sipWrapper_Type.super.tp_base = (PyTypeObject *)&sipSimpleWrapper_Type; sipWrapper_Type.super.tp_base = (PyTypeObject *)&sipSimpleWrapper_Type;
@ -734,30 +734,30 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
#endif #endif
if (PyType_Ready((PyTypeObject *)&sipWrapper_Type) < 0) if (PyType_Ready((PyTypeObject *)&sipWrapper_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.wrapper type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.wrapper type");
if (PyType_Ready(&sipMethodDescr_Type) < 0) if (PyType_Ready(&sipMethodDescr_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.methoddescriptor type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.methoddescriptor type");
if (PyType_Ready(&sipVariableDescr_Type) < 0) if (PyType_Ready(&sipVariableDescr_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.variabledescriptor type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.variabledescriptor type");
sipEnumType_Type.tp_base = &PyType_Type; sipEnumType_Type.tp_base = &PyType_Type;
if (PyType_Ready(&sipEnumType_Type) < 0) if (PyType_Ready(&sipEnumType_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.enumtype type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.enumtype type");
if (PyType_Ready(&sipVoidPtr_Type) < 0) if (PyType_Ready(&sipVoidPtr_Type) < 0)
SIP_FATAL("sip: Failed to initialise sip.voidptr type"); SIP_FATAL("sip-tqt: Failed to initialise sip_tqt.voidptr type");
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
mod = PyModule_Create(&module_def); mod = PyModule_Create(&module_def);
#else #else
mod = Py_InitModule("sip", methods); mod = Py_InitModule("sip_tqt", methods);
#endif #endif
if (mod == NULL) if (mod == NULL)
SIP_FATAL("sip: Failed to intialise sip module"); SIP_FATAL("sip-tqt: Failed to intialise sip_tqt module");
mod_dict = PyModule_GetDict(mod); mod_dict = PyModule_GetDict(mod);
@ -768,12 +768,12 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
if (type_unpickler == NULL || enum_unpickler == NULL) if (type_unpickler == NULL || enum_unpickler == NULL)
{ {
SIP_MODULE_DISCARD(mod); SIP_MODULE_DISCARD(mod);
SIP_FATAL("sip: Failed to get pickle helpers"); SIP_FATAL("sip-tqt: Failed to get pickle helpers");
} }
/* Publish the SIP API. */ /* Publish the SIP-TQt API. */
#if defined(SIP_USE_PYCAPSULE) #if defined(SIP_USE_PYCAPSULE)
obj = PyCapsule_New((void *)&sip_api, "sip._C_API", NULL); obj = PyCapsule_New((void *)&sip_api, "sip_tqt._C_API", NULL);
#else #else
obj = PyCObject_FromVoidPtr((void *)&sip_api, NULL); obj = PyCObject_FromVoidPtr((void *)&sip_api, NULL);
#endif #endif
@ -781,7 +781,7 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
if (obj == NULL) if (obj == NULL)
{ {
SIP_MODULE_DISCARD(mod); SIP_MODULE_DISCARD(mod);
SIP_FATAL("sip: Failed to create _C_API object"); SIP_FATAL("sip-tqt: Failed to create _C_API object");
} }
rc = PyDict_SetItemString(mod_dict, "_C_API", obj); rc = PyDict_SetItemString(mod_dict, "_C_API", obj);
@ -790,31 +790,31 @@ PyMODINIT_FUNC SIP_MODULE_ENTRY(void)
if (rc < 0) if (rc < 0)
{ {
SIP_MODULE_DISCARD(mod); SIP_MODULE_DISCARD(mod);
SIP_FATAL("sip: Failed to add _C_API object to module dictionary"); SIP_FATAL("sip-tqt: Failed to add _C_API object to module dictionary");
} }
/* Add the SIP version number, but don't worry about errors. */ /* Add the SIP-TQt version number, but don't worry about errors. */
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
obj = PyLong_FromLong(SIP_VERSION); obj = PyLong_FromLong(SIP_TQT_VERSION);
#else #else
obj = PyInt_FromLong(SIP_VERSION); obj = PyInt_FromLong(SIP_TQT_VERSION);
#endif #endif
if (obj != NULL) if (obj != NULL)
{ {
PyDict_SetItemString(mod_dict, "SIP_VERSION", obj); PyDict_SetItemString(mod_dict, "SIP_TQT_VERSION", obj);
Py_DECREF(obj); Py_DECREF(obj);
} }
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
obj = PyUnicode_FromString(SIP_VERSION_STR); obj = PyUnicode_FromString(SIP_TQT_VERSION_STR);
#else #else
obj = PyString_FromString(SIP_VERSION_STR); obj = PyString_FromString(SIP_TQT_VERSION_STR);
#endif #endif
if (obj != NULL) if (obj != NULL)
{ {
PyDict_SetItemString(mod_dict, "SIP_VERSION_STR", obj); PyDict_SetItemString(mod_dict, "SIP_TQT_VERSION_STR", obj);
Py_DECREF(obj); Py_DECREF(obj);
} }
@ -1009,7 +1009,7 @@ static PyObject *cast(PyObject *self, PyObject *args)
td = wt->type; td = wt->type;
else else
{ {
PyErr_SetString(PyExc_TypeError, "argument 1 of sip.cast() must be an instance of a sub or super-type of argument 2"); PyErr_SetString(PyExc_TypeError, "argument 1 of sip_tqt.cast() must be an instance of a sub or super-type of argument 2");
return NULL; return NULL;
} }
@ -1175,17 +1175,17 @@ static int sip_api_export_module(sipExportedModuleDef *client,
/* Check that we can support it. */ /* Check that we can support it. */
if (api_major != SIP_API_MAJOR_NR || api_minor > SIP_API_MINOR_NR) if (api_major != SIP_TQT_API_MAJOR_NR || api_minor > SIP_TQT_API_MINOR_NR)
{ {
#if SIP_API_MINOR_NR > 0 #if SIP_TQT_API_MINOR_NR > 0
PyErr_Format(PyExc_RuntimeError, PyErr_Format(PyExc_RuntimeError,
"the sip module implements API v%d.0 to v%d.%d but the %s module requires API v%d.%d", "the sip_tqt module implements API v%d.0 to v%d.%d but the %s module requires API v%d.%d",
SIP_API_MAJOR_NR, SIP_API_MAJOR_NR, SIP_API_MINOR_NR, SIP_TQT_API_MAJOR_NR, SIP_TQT_API_MAJOR_NR, SIP_TQT_API_MINOR_NR,
full_name, api_major, api_minor); full_name, api_major, api_minor);
#else #else
PyErr_Format(PyExc_RuntimeError, PyErr_Format(PyExc_RuntimeError,
"the sip module implements API v%d.0 but the %s module requires API v%d.%d", "the sip_tqt module implements API v%d.0 but the %s module requires API v%d.%d",
SIP_API_MAJOR_NR, full_name, api_major, api_minor); SIP_TQT_API_MAJOR_NR, full_name, api_major, api_minor);
#endif #endif
return -1; return -1;
@ -1210,7 +1210,7 @@ static int sip_api_export_module(sipExportedModuleDef *client,
if (em == NULL) if (em == NULL)
{ {
PyErr_Format(PyExc_RuntimeError, PyErr_Format(PyExc_RuntimeError,
"the %s module failed to register with the sip module", "the %s module failed to register with the sip_tqt module",
im->im_name); im->im_name);
return -1; return -1;
@ -1237,11 +1237,11 @@ static int sip_api_export_module(sipExportedModuleDef *client,
for (em = moduleList; em != NULL; em = em->em_next) for (em = moduleList; em != NULL; em = em->em_next)
{ {
/* SIP clients must have unique names. */ /* SIP-TQt clients must have unique names. */
if (strcmp(sipNameOfModule(em), full_name) == 0) if (strcmp(sipNameOfModule(em), full_name) == 0)
{ {
PyErr_Format(PyExc_RuntimeError, PyErr_Format(PyExc_RuntimeError,
"the sip module has already registered a module called %s", "the sip_tqt module has already registered a module called %s",
full_name); full_name);
return -1; return -1;
@ -1753,7 +1753,7 @@ static PyObject *sip_api_build_result(int *isErr, const char *fmt, ...)
badfmt = TRUE; badfmt = TRUE;
if (badfmt) if (badfmt)
PyErr_Format(PyExc_SystemError,"sipBuildResult(): invalid format string \"%s\"",fmt); PyErr_Format(PyExc_SystemError,"sipTQtBuildResult(): invalid format string \"%s\"",fmt);
else if (tupsz < 0 || (res = PyTuple_New(tupsz)) != NULL) else if (tupsz < 0 || (res = PyTuple_New(tupsz)) != NULL)
res = buildObject(res,fmt,va); res = buildObject(res,fmt,va);
@ -2127,7 +2127,7 @@ static int sip_api_parse_result(int *isErr, PyObject *method, PyObject *res,
{ {
if (ch == '\0') if (ch == '\0')
{ {
PyErr_Format(PyExc_SystemError, "sipParseResult(): invalid format string \"%s\"", fmt - 1); PyErr_Format(PyExc_SystemError, "sipTQtParseResult(): invalid format string \"%s\"", fmt - 1);
rc = -1; rc = -1;
break; break;
@ -2667,7 +2667,7 @@ static int sip_api_parse_result(int *isErr, PyObject *method, PyObject *res,
break; break;
default: default:
PyErr_Format(PyExc_SystemError,"sipParseResult(): invalid format character '%c'",ch); PyErr_Format(PyExc_SystemError,"sipTQtParseResult(): invalid format character '%c'",ch);
rc = -1; rc = -1;
} }
@ -6589,7 +6589,7 @@ static void sip_api_bad_catcher_result(PyObject *method)
PyMethod_GET_SELF(method) == NULL) PyMethod_GET_SELF(method) == NULL)
{ {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"invalid argument to sipBadCatcherResult()"); "invalid argument to sipTQtBadCatcherResult()");
return; return;
} }
@ -6655,7 +6655,7 @@ static void sip_api_transfer_to(PyObject *self, PyObject *owner)
{ {
/* /*
* There is a legitimate case where we try to transfer a PyObject that * There is a legitimate case where we try to transfer a PyObject that
* may not be a SIP generated class. The virtual handler code calls * may not be a SIP-TQt generated class. The virtual handler code calls
* this function to keep the C/C++ instance alive when it gets rid of * this function to keep the C/C++ instance alive when it gets rid of
* the Python object returned by the Python method. A class may have * the Python object returned by the Python method. A class may have
* handwritten code that converts a regular Python type - so we can't * handwritten code that converts a regular Python type - so we can't
@ -8526,7 +8526,7 @@ static PyObject *sipSimpleWrapper_new(sipWrapperType *wt, PyObject *args,
/* /*
* See if it cannot be instantiated or sub-classed from Python, eg. * See if it cannot be instantiated or sub-classed from Python, eg.
* it's an opaque class. Some restrictions might be overcome with * it's an opaque class. Some restrictions might be overcome with
* better SIP support. * better SIP-TQt support.
*/ */
if (((sipClassTypeDef *)td)->ctd_init == NULL) if (((sipClassTypeDef *)td)->ctd_init == NULL)
{ {
@ -8573,12 +8573,12 @@ static int sipSimpleWrapper_init(sipSimpleWrapper *self, PyObject *args,
static int (*kw_handler)(PyObject *, void *, PyObject *); static int (*kw_handler)(PyObject *, void *, PyObject *);
/* /*
* Get any keyword handler if necessary. In SIP v5 this will be * Get any keyword handler if necessary. In SIP-TQt v5 this will be
* generalised and not PyTQt specific. * generalised and not PyTQt specific.
*/ */
if (!got_kw_handler) if (!got_kw_handler)
{ {
kw_handler = sip_api_import_symbol("pyqt_kw_handler"); kw_handler = sip_api_import_symbol("pytqt_kw_handler");
got_kw_handler = TRUE; got_kw_handler = TRUE;
} }
@ -9131,7 +9131,7 @@ sipWrapperType sipSimpleWrapper_Type = {
#endif #endif
{ {
PyVarObject_HEAD_INIT(&sipWrapperType_Type, 0) PyVarObject_HEAD_INIT(&sipWrapperType_Type, 0)
"sip.simplewrapper", /* tp_name */ "sip_tqt.simplewrapper", /* tp_name */
sizeof (sipSimpleWrapper), /* tp_basicsize */ sizeof (sipSimpleWrapper), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)sipSimpleWrapper_dealloc, /* tp_dealloc */ (destructor)sipSimpleWrapper_dealloc, /* tp_dealloc */
@ -10461,7 +10461,7 @@ static int *sip_api_unicode_as_wstring(PyObject *obj)
*/ */
static void raiseNoWChar() static void raiseNoWChar()
{ {
PyErr_SetString(PyExc_SystemError, "sip built without wchar_t support"); PyErr_SetString(PyExc_SystemError, "sip-tqt built without wchar_t support");
} }
#endif #endif

@ -2,18 +2,18 @@
# #
# Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> # Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
# #
# This file is part of SIP. # This file is part of SIP-TQt.
# #
# This copy of SIP is licensed for use under the terms of the SIP License # This copy of SIP-TQt is licensed for use under the terms of the SIP License
# Agreement. See the file LICENSE for more details. # Agreement. See the file LICENSE for more details.
# #
# This copy of SIP may also used under the terms of the GNU General Public # This copy of SIP-TQt may also used under the terms of the GNU General Public
# License v2 or v3 as published by the Free Software Foundation which can be # License v2 or v3 as published by the Free Software Foundation which can be
# found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. # found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
# #
# SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of # SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
target = sip target = sip_tqt
sources = siplib.c apiversions.c descriptors.c tqtlib.c threads.c objmap.c voidptr.c bool.cpp sources = siplib.c apiversions.c descriptors.c tqtlib.c threads.c objmap.c voidptr.c bool.cpp
headers = sip.h sipint.h headers = sip-tqt.h sipint.h

@ -1,25 +1,25 @@
/* /*
* Thread support for the SIP library. This module provides the hooks for * Thread support for the SIP-TQt library. This module provides the hooks for
* C++ classes that provide a thread interface to interact properly with the * C++ classes that provide a thread interface to interact properly with the
* Python threading infrastructure. * Python threading infrastructure.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"

@ -1,19 +1,19 @@
/* /*
* The SIP library code that implements the interface to the optional module * The SIP-TQt library code that implements the interface to the optional module
* supplied TQt support. * supplied TQt support.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -22,7 +22,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"
@ -171,7 +171,7 @@ PyObject *sip_api_invoke_slot(const sipSlot *slot, PyObject *sigargs)
if ((sfunc = PyObject_GetAttrString(self, mname)) == NULL || !PyCFunction_Check(sfunc)) if ((sfunc = PyObject_GetAttrString(self, mname)) == NULL || !PyCFunction_Check(sfunc))
{ {
/* /*
* Note that in earlier versions of SIP this error would be * Note that in earlier versions of SIP-TQt this error would be
* detected when the slot was connected. * detected when the slot was connected.
*/ */
PyErr_Format(PyExc_NameError,"Invalid slot %s",mname); PyErr_Format(PyExc_NameError,"Invalid slot %s",mname);

@ -1,18 +1,18 @@
/* /*
* SIP library code. * SIP-TQt library code.
* *
* Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> * Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
* *
* This file is part of SIP. * This file is part of SIP-TQt.
* *
* This copy of SIP is licensed for use under the terms of the SIP License * This copy of SIP-TQt is licensed for use under the terms of the SIP License
* Agreement. See the file LICENSE for more details. * Agreement. See the file LICENSE for more details.
* *
* This copy of SIP may also used under the terms of the GNU General Public * This copy of SIP-TQt may also used under the terms of the GNU General Public
* License v2 or v3 as published by the Free Software Foundation which can be * License v2 or v3 as published by the Free Software Foundation which can be
* found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. * found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
* *
* SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of * SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
@ -21,7 +21,7 @@
#include <stddef.h> #include <stddef.h>
#include "sip.h" #include "sip-tqt.h"
#include "sipint.h" #include "sipint.h"
@ -134,7 +134,7 @@ static SIP_SSIZE_T sipVoidPtr_getwritebuffer(PyObject *self, SIP_SSIZE_T seg,
if (((sipVoidPtrObject *)self)->rw) if (((sipVoidPtrObject *)self)->rw)
return sipVoidPtr_getbuffer(self, seg, ptr); return sipVoidPtr_getbuffer(self, seg, ptr);
PyErr_SetString(PyExc_TypeError, "the sip.voidptr is not writeable"); PyErr_SetString(PyExc_TypeError, "the sip_tqt.voidptr is not writeable");
return -1; return -1;
} }
#endif #endif
@ -230,7 +230,7 @@ static PyObject *sipVoidPtr_asstring(sipVoidPtrObject *v, PyObject *args,
if (size < 0) if (size < 0)
{ {
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"a size must be given or the sip.voidptr must have a size"); "a size must be given or the sip_tqt.voidptr must have a size");
return NULL; return NULL;
} }
@ -395,7 +395,7 @@ static PyBufferProcs sipVoidPtr_BufferProcs = {
/* The type data structure. */ /* The type data structure. */
PyTypeObject sipVoidPtr_Type = { PyTypeObject sipVoidPtr_Type = {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"sip.voidptr", /* tp_name */ "sip_tqt.voidptr", /* tp_name */
sizeof (sipVoidPtrObject), /* tp_basicsize */ sizeof (sipVoidPtrObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
0, /* tp_dealloc */ 0, /* tp_dealloc */
@ -442,7 +442,7 @@ void *sip_api_convert_to_void_ptr(PyObject *obj)
{ {
if (obj == NULL) if (obj == NULL)
{ {
PyErr_SetString(PyExc_TypeError, "sip.voidptr is NULL"); PyErr_SetString(PyExc_TypeError, "sip_tqt.voidptr is NULL");
return NULL; return NULL;
} }
@ -469,7 +469,7 @@ void *sip_api_convert_to_void_ptr(PyObject *obj)
/* /*
* Convert a C/C++ void pointer to a sip.voidptr object. * Convert a C/C++ void pointer to a sip_tqt.voidptr object.
*/ */
PyObject *sip_api_convert_from_void_ptr(void *val) PyObject *sip_api_convert_from_void_ptr(void *val)
{ {
@ -478,7 +478,7 @@ PyObject *sip_api_convert_from_void_ptr(void *val)
/* /*
* Convert a C/C++ void pointer to a sip.voidptr object. * Convert a C/C++ void pointer to a sip_tqt.voidptr object.
*/ */
PyObject *sip_api_convert_from_const_void_ptr(const void *val) PyObject *sip_api_convert_from_const_void_ptr(const void *val)
{ {
@ -487,7 +487,7 @@ PyObject *sip_api_convert_from_const_void_ptr(const void *val)
/* /*
* Convert a sized C/C++ void pointer to a sip.voidptr object. * Convert a sized C/C++ void pointer to a sip_tqt.voidptr object.
*/ */
PyObject *sip_api_convert_from_void_ptr_and_size(void *val, SIP_SSIZE_T size) PyObject *sip_api_convert_from_void_ptr_and_size(void *val, SIP_SSIZE_T size)
{ {
@ -496,7 +496,7 @@ PyObject *sip_api_convert_from_void_ptr_and_size(void *val, SIP_SSIZE_T size)
/* /*
* Convert a sized C/C++ const void pointer to a sip.voidptr object. * Convert a sized C/C++ const void pointer to a sip_tqt.voidptr object.
*/ */
PyObject *sip_api_convert_from_const_void_ptr_and_size(const void *val, PyObject *sip_api_convert_from_const_void_ptr_and_size(const void *val,
SIP_SSIZE_T size) SIP_SSIZE_T size)

@ -1,19 +1,19 @@
# This module is intended to be used by the build/installation scripts of # This module is intended to be used by the build/installation scripts of
# extension modules created with SIP. It provides information about file # extension modules created with SIP-TQt. It provides information about file
# locations, version numbers etc., and provides some classes and functions. # locations, version numbers etc., and provides some classes and functions.
# #
# Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com> # Copyright (c) 2010 Riverbank Computing Limited <info@riverbankcomputing.com>
# #
# This file is part of SIP. # This file is part of SIP-TQt.
# #
# This copy of SIP is licensed for use under the terms of the SIP License # This copy of SIP-TQt is licensed for use under the terms of the SIP License
# Agreement. See the file LICENSE for more details. # Agreement. See the file LICENSE for more details.
# #
# This copy of SIP may also used under the terms of the GNU General Public # This copy of SIP-TQt may also used under the terms of the GNU General Public
# License v2 or v3 as published by the Free Software Foundation which can be # License v2 or v3 as published by the Free Software Foundation which can be
# found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package. # found in the files LICENSE-GPL2 and LICENSE-GPL3 included in this package.
# #
# SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of # SIP-TQt is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@ -24,7 +24,7 @@ import string
import re import re
# These are installation specific values created when SIP was configured. # These are installation specific values created when SIP-TQt was configured.
# @SIP_CONFIGURATION@ # @SIP_CONFIGURATION@
# The stack of configuration dictionaries. # The stack of configuration dictionaries.
@ -32,7 +32,7 @@ _config_stack = []
class Configuration(object): class Configuration(object):
"""The class that represents SIP configuration values. """The class that represents SIP-TQt configuration values.
""" """
def __init__(self, sub_cfg=None): def __init__(self, sub_cfg=None):
"""Initialise an instance of the class. """Initialise an instance of the class.
@ -412,7 +412,7 @@ class Makefile:
for l in self.extra_lib_dirs: for l in self.extra_lib_dirs:
# Ignore relative directories. This is really a hack to handle # Ignore relative directories. This is really a hack to handle
# SIP v3 inter-module linking. # SIP-TQt v3 inter-module linking.
if os.path.dirname(l) not in ("", ".", ".."): if os.path.dirname(l) not in ("", ".", ".."):
rpaths.append(l) rpaths.append(l)
@ -1425,7 +1425,7 @@ class ModuleMakefile(Makefile):
dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep) dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep)
if "Python.framework" not in dl: if "Python.framework" not in dl:
error("SIP requires Python to be built as a framework") error("SIP-TQt requires Python to be built as a framework")
self.LFLAGS.append("-undefined dynamic_lookup") self.LFLAGS.append("-undefined dynamic_lookup")
@ -1436,7 +1436,7 @@ class ModuleMakefile(Makefile):
# AIX needs a lot of special handling. # AIX needs a lot of special handling.
if self.required_string('LINK') == 'g++': if self.required_string('LINK') == 'g++':
# g++ is used for linking. # g++ is used for linking.
# For SIP v4 and g++: # For SIP-TQt v4 and g++:
# 1.) Import the python symbols # 1.) Import the python symbols
aix_lflags = ['-Wl,-bI:%s/python.exp' % self.config.py_lib_dir] aix_lflags = ['-Wl,-bI:%s/python.exp' % self.config.py_lib_dir]
@ -1446,7 +1446,7 @@ class ModuleMakefile(Makefile):
aix_lflags.append('-Wl,-bE:%s.exp' % self._target) aix_lflags.append('-Wl,-bE:%s.exp' % self._target)
else: else:
# IBM VisualAge C++ is used for linking. # IBM VisualAge C++ is used for linking.
# For SIP v4 and xlC: # For SIP-TQt v4 and xlC:
# 1.) Create a shared object # 1.) Create a shared object
# 2.) Import the python symbols # 2.) Import the python symbols
aix_lflags = ['-qmkshrobj', aix_lflags = ['-qmkshrobj',
@ -1485,12 +1485,12 @@ class ModuleMakefile(Makefile):
self.LFLAGS.remove('-Wl,--no-undefined') self.LFLAGS.remove('-Wl,--no-undefined')
def module_as_lib(self, mname): def module_as_lib(self, mname):
"""Return the name of a SIP v3.x module when it is used as a library. """Return the name of a SIP-TQt v3.x module when it is used as a library.
This will raise an exception when used with SIP v4.x modules. This will raise an exception when used with SIP-TQt v4.x modules.
mname is the name of the module. mname is the name of the module.
""" """
raise ValueError("module_as_lib() can only be used with SIP v3.x") raise ValueError("module_as_lib() can only be used with SIP-TQt v3.x")
def generate_macros_and_rules(self, mfile): def generate_macros_and_rules(self, mfile):
"""Generate the macros and rules generation. """Generate the macros and rules generation.
@ -1643,13 +1643,13 @@ class ModuleMakefile(Makefile):
class SIPModuleMakefile(ModuleMakefile): class SIPModuleMakefile(ModuleMakefile):
"""The class that represents a SIP generated module Makefile. """The class that represents a SIP-TQt generated module Makefile.
""" """
def __init__(self, configuration, build_file, install_dir=None, static=0, def __init__(self, configuration, build_file, install_dir=None, static=0,
console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0, console=0, qt=0, opengl=0, threaded=0, warnings=1, debug=0,
dir=None, makefile="Makefile", installs=None, strip=1, dir=None, makefile="Makefile", installs=None, strip=1,
export_all=0, universal=None, arch=None, prot_is_public=0): export_all=0, universal=None, arch=None, prot_is_public=0):
"""Initialise an instance of a SIP generated module Makefile. """Initialise an instance of a SIP-TQt generated module Makefile.
prot_is_public is set if "protected" is to be redefined as "public". prot_is_public is set if "protected" is to be redefined as "public".
If the platform's C++ ABI allows it this can significantly reduce the If the platform's C++ ABI allows it this can significantly reduce the
@ -1664,7 +1664,7 @@ class SIPModuleMakefile(ModuleMakefile):
self._prot_is_public = prot_is_public self._prot_is_public = prot_is_public
def finalise(self): def finalise(self):
"""Finalise the macros for a SIP generated module Makefile. """Finalise the macros for a SIP-TQt generated module Makefile.
""" """
if self._prot_is_public: if self._prot_is_public:
self.DEFINES.append('SIP_PROTECTED_IS_PUBLIC') self.DEFINES.append('SIP_PROTECTED_IS_PUBLIC')
@ -2083,7 +2083,7 @@ def create_config_module(module, template, content, macros=None):
def version_to_sip_tag(version, tags, description): def version_to_sip_tag(version, tags, description):
"""Convert a version number to a SIP tag. """Convert a version number to a SIP-TQt tag.
version is the version number. If it is negative then the latest version version is the version number. If it is negative then the latest version
is assumed. (This is typically useful if a snapshot is indicated by a is assumed. (This is typically useful if a snapshot is indicated by a

@ -0,0 +1,81 @@
#
#
# qmake configuration for freebsd-clang
#
MAKEFILE_GENERATOR = UNIX
TEMPLATE = app
CONFIG += qt warn_on release thread link_prl
QMAKE_CC = clang
QMAKE_LEX = flex
QMAKE_LEXFLAGS =
QMAKE_YACC = yacc
QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -pipe -fvisibility=hidden
QMAKE_CFLAGS_DEPS = -M
QMAKE_CFLAGS_WARN_ON = -Wall -W
QMAKE_CFLAGS_WARN_OFF = -w
QMAKE_CFLAGS_RELEASE = -O2
QMAKE_CFLAGS_DEBUG = -g
QMAKE_CFLAGS_SHLIB = -fPIC
QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_THREAD = -pthread -D_THREAD_SAFE
QMAKE_CXX = clang++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -fvisibility-inlines-hidden
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_SHLIB = $$QMAKE_CFLAGS_SHLIB
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
# Addon software goes into /usr/local on the BSDs, by default we will look there
QMAKE_INCDIR = /usr/local/include
QMAKE_LIBDIR = /usr/local/lib
QMAKE_INCDIR_X11 = /usr/X11R6/include
QMAKE_LIBDIR_X11 = /usr/X11R6/lib
QMAKE_INCDIR_TQT = $(TQTDIR)/include
QMAKE_LIBDIR_TQT = $(TQTDIR)/lib
QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_LINK = clang++
QMAKE_LINK_SHLIB = clang++
QMAKE_LFLAGS =
QMAKE_LFLAGS_RELEASE =
QMAKE_LFLAGS_DEBUG =
QMAKE_LFLAGS_SHLIB = -shared
QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB
QMAKE_LFLAGS_SONAME = -Wl,-soname,
QMAKE_LFLAGS_THREAD = -pthread
QMAKE_RPATH = -Wl,-rpath,
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_X11 = -lXext -lX11 -lm
QMAKE_LIBS_X11SM = -lSM -lICE
QMAKE_LIBS_QT = -lqt
QMAKE_LIBS_QT_THREAD = -ltqt-mt
QMAKE_LIBS_OPENGL = -lGLU -lGL -lXmu
QMAKE_LIBS_OPENGL_QT = -lGL -lXmu
QMAKE_LIBS_THREAD =
QMAKE_MOC = $(TQTDIR)/bin/tqmoc
QMAKE_UIC = $(TQTDIR)/bin/tquic
QMAKE_AR = ar cqs
QMAKE_RANLIB =
QMAKE_TAR = tar -cf
QMAKE_GZIP = gzip -9f
QMAKE_COPY = cp -f
QMAKE_MOVE = mv -f
QMAKE_DEL_FILE = rm -f
QMAKE_DEL_DIR = rmdir
QMAKE_CHK_DIR_EXISTS = test -d
QMAKE_MKDIR = mkdir -p
Loading…
Cancel
Save