summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-01-21 09:10:29 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-21 09:10:30 +0100
commit8e0c4694f89dd66314faf5cfd411f58f2f8e1bca (patch)
tree673a930c1c70741718f618c723cfdce3fe3ca02c /include
parent77c677a41d4bc9a2cd71ea1cc17e6c836387a6c5 (diff)
Clean up lok::Office::freeError()
- let it take a non-const pointer, just like free() or g_free() does - remove lok::Document::freeError(), which was declared, but not implemented - move the declaration at the end of the stable API, but before the unstable section Change-Id: I5a8ced61fc87641dc2fa0ea3615a350361fae3a1
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.h4
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx11
2 files changed, 6 insertions, 9 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 80f8451633ac..663f62034945 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -55,6 +55,8 @@ struct _LibreOfficeKitClass
LibreOfficeKitDocument* (*documentLoadWithOptions) (LibreOfficeKit* pThis,
const char* pURL,
const char* pOptions);
+ void (*freeError) (char* pFree);
+
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
void (*registerCallback) (LibreOfficeKit* pThis,
LibreOfficeKitCallback pCallback,
@@ -63,7 +65,6 @@ struct _LibreOfficeKitClass
/// @see lok::Office::getFilterTypes().
char* (*getFilterTypes) (LibreOfficeKit* pThis);
#endif
- void (*freeError) (const char *pfree);
};
@@ -84,7 +85,6 @@ struct _LibreOfficeKitDocumentClass
const char* pUrl,
const char* pFormat,
const char* pFilterOptions);
- void (*freeError) (const char *pfree);
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
/// @see lok::Document::getDocumentType().
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 5623fad8c0e2..ee2b27e92aff 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -56,10 +56,6 @@ public:
/// Gives access to the underlying C pointer.
inline LibreOfficeKitDocument *get() { return mpDoc; }
- inline void freeError(const char *pfree)
- {
- mpDoc->pClass->freeError(pfree);
- }
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
/**
@@ -438,12 +434,13 @@ public:
{
return mpThis->pClass->getError(mpThis);
}
- inline void freeError(const char *pfree)
+
+ /// Frees the memory pointed to by pFree.
+ inline void freeError(char* pFree)
{
- mpThis->pClass->freeError(pfree);
+ mpThis->pClass->freeError(pFree);
}
-
#if defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
/**
* Returns details of filter types.