[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-windows
Subject: *_EXPORT not needed for static members
From: Jarosław_Staniek <js () iidea ! pl>
Date: 2007-06-20 14:35:52
Message-ID: 46793B48.20906 () iidea ! pl
[Download RAW message or body]
Hello,
See the attached patch, fixing compialtion for msvc.net (2003).
*_EXPORT is not needed for static members since class is exported itself.
As the static members are public, to increase cross-dll safety (simply, their
behaviour is not well defined across runtimes), wouldn't it be nice to add
static functions instead of variables? Similar to KGlobal::locale().
--
regards / pozdrawiam, Jaroslaw Staniek
Sponsored by OpenOffice Polska (http://www.openoffice.com.pl/en) to work on
Kexi & KOffice: http://www.kexi.pl/en, http://www.koffice.org
KDE3 & KDE4 Libraries for MS Windows: http://kdelibs.com, http://www.kde.org
["static_export.patch" (text/plain)]
Index: src/streamanalyzer/fieldtypes.cpp
===================================================================
--- src/streamanalyzer/fieldtypes.cpp (revision 677989)
+++ src/streamanalyzer/fieldtypes.cpp (working copy)
@@ -27,22 +27,22 @@
: m_key(k), m_type(t), m_maxoccurs(m), m_parent(p), m_writerdata(0) {
}
-STREAMANALYZER_EXPORT const string FieldRegister::floatType = "float";
-STREAMANALYZER_EXPORT const string FieldRegister::integerType = "integer";
-STREAMANALYZER_EXPORT const string FieldRegister::binaryType = "binary";
-STREAMANALYZER_EXPORT const string FieldRegister::stringType = "string";
-STREAMANALYZER_EXPORT const string FieldRegister::datetimeType = "datetime";
+const string FieldRegister::floatType = "float";
+const string FieldRegister::integerType = "integer";
+const string FieldRegister::binaryType = "binary";
+const string FieldRegister::stringType = "string";
+const string FieldRegister::datetimeType = "datetime";
-STREAMANALYZER_EXPORT const string FieldRegister::pathFieldName = "system.location";
-STREAMANALYZER_EXPORT const string FieldRegister::encodingFieldName = "content.charset";
-STREAMANALYZER_EXPORT const string FieldRegister::mimetypeFieldName = "content.mime_type";
-STREAMANALYZER_EXPORT const string FieldRegister::filenameFieldName = "system.file_name";
-STREAMANALYZER_EXPORT const string FieldRegister::extensionFieldName = "system.file_extension";
-STREAMANALYZER_EXPORT const string FieldRegister::embeddepthFieldName = "system.depth";
-STREAMANALYZER_EXPORT const string FieldRegister::mtimeFieldName = "system.last_modified_time";
-STREAMANALYZER_EXPORT const string FieldRegister::sizeFieldName = "system.size";
+const string FieldRegister::pathFieldName = "system.location";
+const string FieldRegister::encodingFieldName = "content.charset";
+const string FieldRegister::mimetypeFieldName = "content.mime_type";
+const string FieldRegister::filenameFieldName = "system.file_name";
+const string FieldRegister::extensionFieldName = "system.file_extension";
+const string FieldRegister::embeddepthFieldName = "system.depth";
+const string FieldRegister::mtimeFieldName = "system.last_modified_time";
+const string FieldRegister::sizeFieldName = "system.size";
-STREAMANALYZER_EXPORT const string FieldRegister::defaultNamespace = "strigi.";
+const string FieldRegister::defaultNamespace = "strigi.";
FieldRegister::FieldRegister() {
pathField = registerField(pathFieldName, stringType, 1, 0);
Index: src/streams/fileinputstream.cpp
===================================================================
--- src/streams/fileinputstream.cpp (revision 677989)
+++ src/streams/fileinputstream.cpp (working copy)
@@ -24,7 +24,7 @@
using namespace Strigi;
-STREAMS_EXPORT const int32_t FileInputStream::defaultBufferSize = 1048576;
+const int32_t FileInputStream::defaultBufferSize = 1048576;
FileInputStream::FileInputStream(const char *filepath, int32_t buffersize) {
if (filepath == 0) {
_______________________________________________
Kde-windows mailing list
Kde-windows@kde.org
https://mail.kde.org/mailman/listinfo/kde-windows
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic