CELIX-249: Refactors most uses of char* / char** to const char*/const char**
Project: http://git-wip-us.apache.org/repos/asf/celix/repo Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/6f85bf3c Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/6f85bf3c Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/6f85bf3c Branch: refs/heads/develop Commit: 6f85bf3c2f9cb9e303f2865571021bcc2d9bf7bd Parents: 38f2fe4 Author: Pepijn Noltes <[email protected]> Authored: Wed Jul 6 13:00:58 2016 +0200 Committer: Pepijn Noltes <[email protected]> Committed: Wed Jul 6 13:00:58 2016 +0200 ---------------------------------------------------------------------- .../config_admin_tst/config_admin_test.cpp | 2 +- .../service/private/include/framework_patch.h | 2 +- .../private/src/configuration_admin_impl.c | 8 +- .../service/private/src/configuration_impl.c | 6 +- .../private/src/managed_service_tracker.c | 4 +- .../private/include/deployment_package.h | 8 +- deployment_admin/private/src/deployment_admin.c | 22 +++--- .../private/src/deployment_package.c | 16 ++-- .../device_access/private/src/device_manager.c | 10 +-- .../private/src/driver_attributes.c | 2 +- .../device_access/private/src/driver_matcher.c | 6 +- examples/mongoose/private/src/activator.c | 2 +- framework/private/include/bundle_cache.h | 2 +- framework/private/include/framework_private.h | 10 +-- framework/private/include/manifest_parser.h | 2 +- .../include/service_registration_private.h | 2 +- framework/private/mock/bundle_archive_mock.c | 10 +-- framework/private/mock/bundle_cache_mock.c | 2 +- framework/private/mock/bundle_context_mock.c | 6 +- framework/private/mock/bundle_mock.c | 6 +- framework/private/mock/bundle_revision_mock.c | 6 +- framework/private/mock/capability_mock.c | 2 +- framework/private/mock/celix_log_mock.c | 14 ++-- framework/private/mock/filter_mock.c | 2 +- framework/private/mock/framework_mock.c | 10 +-- framework/private/mock/manifest_mock.c | 8 +- framework/private/mock/manifest_parser_mock.c | 2 +- framework/private/mock/miniunz_mock.c | 2 +- framework/private/mock/module_mock.c | 6 +- framework/private/mock/requirement_mock.c | 2 +- framework/private/mock/service_reference_mock.c | 8 +- .../private/mock/service_registration_mock.c | 2 +- framework/private/mock/version_mock.c | 4 +- framework/private/src/bundle.c | 12 +-- framework/private/src/bundle_archive.c | 26 +++---- framework/private/src/bundle_cache.c | 2 +- framework/private/src/bundle_context.c | 6 +- framework/private/src/bundle_revision.c | 6 +- framework/private/src/capability.c | 2 +- framework/private/src/celix_log.c | 6 +- framework/private/src/filter.c | 2 +- framework/private/src/framework.c | 78 ++++++++++---------- framework/private/src/manifest.c | 10 +-- framework/private/src/manifest_parser.c | 30 ++++---- framework/private/src/miniunz.c | 4 +- framework/private/src/module.c | 10 +-- framework/private/src/requirement.c | 2 +- framework/private/src/resolver.c | 18 ++--- framework/private/src/service_reference.c | 8 +- framework/private/src/service_registration.c | 2 +- framework/private/src/service_registry.c | 4 +- framework/private/src/service_tracker.c | 4 +- framework/private/src/utils.c | 10 +-- framework/private/test/bundle_revision_test.cpp | 4 +- framework/private/test/bundle_test.cpp | 2 +- framework/private/test/capability_test.cpp | 2 +- framework/private/test/filter_test.cpp | 2 +- framework/private/test/manifest_parser_test.cpp | 4 +- framework/private/test/manifest_test.cpp | 2 +- framework/private/test/requirement_test.cpp | 2 +- .../private/test/service_registration_test.cpp | 4 +- framework/public/include/archive.h | 2 +- framework/public/include/bundle.h | 8 +- framework/public/include/bundle_archive.h | 10 +-- framework/public/include/bundle_context.h | 10 +-- framework/public/include/bundle_revision.h | 6 +- framework/public/include/capability.h | 2 +- framework/public/include/celix_log.h | 8 +- framework/public/include/filter.h | 2 +- framework/public/include/manifest.h | 8 +- framework/public/include/module.h | 6 +- framework/public/include/requirement.h | 2 +- framework/public/include/service_reference.h | 4 +- framework/public/include/service_registration.h | 2 +- framework/public/include/service_tracker.h | 4 +- framework/public/include/utils.h | 6 +- log_service/private/src/log_entry.c | 6 +- log_service/private/src/log_service_impl.c | 2 +- log_service/public/include/log_entry.h | 6 +- .../rsa/private/src/dfi_utils.c | 3 +- .../private/test/rsa_client_server_tests.cpp | 4 +- .../private/test/rsa_client_server_tests.cpp | 4 +- shell/private/src/inspect_command.c | 6 +- shell/private/src/lb_command.c | 4 +- utils/private/include/hash_map_private.h | 20 ++--- utils/private/src/hash_map.c | 30 ++++---- utils/private/src/version.c | 4 +- utils/private/test/hash_map_test.cpp | 8 +- utils/public/include/hash_map.h | 24 +++--- utils/public/include/version.h | 4 +- 90 files changed, 333 insertions(+), 332 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/config_admin/config_admin_tst/config_admin_test.cpp ---------------------------------------------------------------------- diff --git a/config_admin/config_admin_tst/config_admin_test.cpp b/config_admin/config_admin_tst/config_admin_test.cpp index 25898d2..04cd6d7 100644 --- a/config_admin/config_admin_tst/config_admin_test.cpp +++ b/config_admin/config_admin_tst/config_admin_test.cpp @@ -295,7 +295,7 @@ tst2_service_pt test2Serv = NULL; bundle_pt fwBundle = NULL; bundle_archive_pt archive = NULL; bundle_context_pt context = NULL; - char *location = NULL; + const char *location = NULL; /* ------------------ get Configuration -------------------*/ configuration_pt configuration; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/config_admin/service/private/include/framework_patch.h ---------------------------------------------------------------------- diff --git a/config_admin/service/private/include/framework_patch.h b/config_admin/service/private/include/framework_patch.h index 32200b5..98194e1 100644 --- a/config_admin/service/private/include/framework_patch.h +++ b/config_admin/service/private/include/framework_patch.h @@ -34,6 +34,6 @@ #include "bundle.h" #include "service_reference.h" -celix_status_t bundle_getBundleLocation(bundle_pt bundle, char **location); +celix_status_t bundle_getBundleLocation(bundle_pt bundle, const char **location); #endif /* BUNDLE_PATCH_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/config_admin/service/private/src/configuration_admin_impl.c ---------------------------------------------------------------------- diff --git a/config_admin/service/private/src/configuration_admin_impl.c b/config_admin/service/private/src/configuration_admin_impl.c index e88e191..6d01cb0 100644 --- a/config_admin/service/private/src/configuration_admin_impl.c +++ b/config_admin/service/private/src/configuration_admin_impl.c @@ -100,8 +100,8 @@ celix_status_t configurationAdmin_createFactoryConfiguration2(configuration_admi celix_status_t configurationAdmin_getConfiguration(configuration_admin_pt configAdmin, char *pid, configuration_pt *configuration){ configuration_pt config; - char *configAdminBundleLocation; - char *configBundleLocation; + const char* configAdminBundleLocation; + const char* configBundleLocation; // (1) configurationAdmin.checkPid @@ -117,7 +117,7 @@ celix_status_t configurationAdmin_getConfiguration(configuration_admin_pt config } // (3) delegates to configurationStore.getConfiguration - if ( configurationStore_getConfiguration(configAdmin->configurationStore, pid, configAdminBundleLocation, &config) != CELIX_SUCCESS ){ + if ( configurationStore_getConfiguration(configAdmin->configurationStore, pid, (char*)configAdminBundleLocation, &config) != CELIX_SUCCESS ){ *configuration = NULL; return CELIX_ILLEGAL_ARGUMENT; } @@ -138,7 +138,7 @@ celix_status_t configurationAdmin_getConfiguration(configuration_admin_pt config // (4) config.getBundleLocation != NULL ? - if ( configuration_getBundleLocation2(config->handle,false,&configBundleLocation) == CELIX_SUCCESS ){ + if ( configuration_getBundleLocation2(config->handle,false,(char**)&configBundleLocation) == CELIX_SUCCESS ){ if ( strcmp(configAdminBundleLocation,configBundleLocation) != 0 ){ http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/config_admin/service/private/src/configuration_impl.c ---------------------------------------------------------------------- diff --git a/config_admin/service/private/src/configuration_impl.c b/config_admin/service/private/src/configuration_impl.c index 3c2cf00..ed3c8c6 100644 --- a/config_admin/service/private/src/configuration_impl.c +++ b/config_admin/service/private/src/configuration_impl.c @@ -415,7 +415,7 @@ celix_status_t configuration_bind(configuration_impl_pt configuration, bundle_pt // (2): it's the configuration located? if ( configuration->bundleLocation != NULL ){//(2): Yes - if ( bundle_getBundleLocation(bundle, &bundleLocation) != CELIX_SUCCESS){ + if ( bundle_getBundleLocation(bundle, (const char**)&bundleLocation) != CELIX_SUCCESS){ configuration_unlock(configuration); return CELIX_ILLEGAL_ARGUMENT; } @@ -459,7 +459,7 @@ celix_status_t configuration_unbind(configuration_impl_pt configuration, bundle_ return CELIX_SUCCESS; } -celix_status_t configuration_getBundleLocation2(configuration_impl_pt configuration, bool checkPermission, char **location){ +celix_status_t configuration_getBundleLocation2(configuration_impl_pt configuration, bool checkPermission, char** location){ celix_status_t status; @@ -488,7 +488,7 @@ celix_status_t configuration_getBundleLocation2(configuration_impl_pt configurat // (5) if ( configuration->boundBundle != NULL ){ - status = bundle_getBundleLocation(configuration->boundBundle,location); + status = bundle_getBundleLocation(configuration->boundBundle,(const char**)location); configuration_unlock(configuration); return status; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/config_admin/service/private/src/managed_service_tracker.c ---------------------------------------------------------------------- diff --git a/config_admin/service/private/src/managed_service_tracker.c b/config_admin/service/private/src/managed_service_tracker.c index 79f573d..a42d565 100644 --- a/config_admin/service/private/src/managed_service_tracker.c +++ b/config_admin/service/private/src/managed_service_tracker.c @@ -306,7 +306,7 @@ celix_status_t managedServiceTracker_add(managed_service_tracker_pt tracker, ser celix_status_t status; bundle_pt bundle = NULL; - char *bundleLocation; + const char* bundleLocation; configuration_pt configuration = NULL; properties_pt properties = NULL; @@ -328,7 +328,7 @@ celix_status_t managedServiceTracker_add(managed_service_tracker_pt tracker, ser } // (1) creates a new Configuration for the ManagedService - if (configurationStore_getConfiguration(tracker->configurationStore, pid, bundleLocation, &configuration) != CELIX_SUCCESS || configuration == NULL) { + if (configurationStore_getConfiguration(tracker->configurationStore, pid, (char*)bundleLocation, &configuration) != CELIX_SUCCESS || configuration == NULL) { return CELIX_ILLEGAL_ARGUMENT; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/deployment_admin/private/include/deployment_package.h ---------------------------------------------------------------------- diff --git a/deployment_admin/private/include/deployment_package.h b/deployment_admin/private/include/deployment_package.h index 9864c4e..06c1767 100644 --- a/deployment_admin/private/include/deployment_package.h +++ b/deployment_admin/private/include/deployment_package.h @@ -65,12 +65,12 @@ typedef struct deployment_package *deployment_package_pt; celix_status_t deploymentPackage_create(bundle_context_pt context, manifest_pt manifest, deployment_package_pt *package); celix_status_t deploymentPackage_destroy(deployment_package_pt package); -celix_status_t deploymentPackage_getName(deployment_package_pt package, char **name); +celix_status_t deploymentPackage_getName(deployment_package_pt package, const char** name); celix_status_t deploymentPackage_getBundleInfos(deployment_package_pt package, array_list_pt *infos); -celix_status_t deploymentPackage_getBundleInfoByName(deployment_package_pt package, char *name, bundle_info_pt *info); +celix_status_t deploymentPackage_getBundleInfoByName(deployment_package_pt package, const char* name, bundle_info_pt *info); celix_status_t deploymentPackage_getResourceInfos(deployment_package_pt package, array_list_pt *infos); -celix_status_t deploymentPackage_getResourceInfoByPath(deployment_package_pt package, char *path, resource_info_pt *info); -celix_status_t deploymentPackage_getBundle(deployment_package_pt package, char *name, bundle_pt *bundle); +celix_status_t deploymentPackage_getResourceInfoByPath(deployment_package_pt package, const char* path, resource_info_pt *info); +celix_status_t deploymentPackage_getBundle(deployment_package_pt package, const char* name, bundle_pt *bundle); celix_status_t deploymentPackage_getVersion(deployment_package_pt package, version_pt *version); #endif /* DEPLOYMENT_PACKAGE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/deployment_admin/private/src/deployment_admin.c ---------------------------------------------------------------------- diff --git a/deployment_admin/private/src/deployment_admin.c b/deployment_admin/private/src/deployment_admin.c index 1eb58f3..74cb6a8 100644 --- a/deployment_admin/private/src/deployment_admin.c +++ b/deployment_admin/private/src/deployment_admin.c @@ -285,7 +285,7 @@ static void *deploymentAdmin_poll(void *deploymentAdmin) { if (status == CELIX_SUCCESS) { bundle_pt bundle = NULL; bundleContext_getBundle(admin->context, &bundle); - char *entry = NULL; + const char *entry = NULL; bundle_getEntry(bundle, "/", &entry); // Handle file @@ -308,7 +308,7 @@ static void *deploymentAdmin_poll(void *deploymentAdmin) { manifest_createFromFile(manifest, &mf); deployment_package_pt source = NULL; deploymentPackage_create(admin->context, mf, &source); - char *name = NULL; + const char *name = NULL; deploymentPackage_getName(source, &name); int repoDirLength = strlen(entry) + 5; @@ -346,7 +346,7 @@ static void *deploymentAdmin_poll(void *deploymentAdmin) { fw_log(logger, OSGI_FRAMEWORK_LOG_ERROR, "Remove of %s failed",inputFilename); } admin->current = strdup(last); - hashMap_put(admin->packages, name, source); + hashMap_put(admin->packages, (char*)name, source); } if (inputFilename != NULL) { free(inputFilename); @@ -562,9 +562,9 @@ celix_status_t deploymentAdmin_updateDeploymentPackageBundles(deployment_admin_p bundle_info_pt info = arrayList_get(infos, i); bundleContext_getBundle(admin->context, &bundle); - char *entry = NULL; + const char *entry = NULL; bundle_getEntry(bundle, "/", &entry); - char *name = NULL; + const char *name = NULL; deploymentPackage_getName(source, &name); int bundlePathLength = strlen(entry) + strlen(name) + strlen(info->path) + 7; @@ -662,9 +662,9 @@ celix_status_t deploymentAdmin_processDeploymentPackageResources(deployment_admi status = bundleContext_getService(admin->context, ref, &processorP); if (status == CELIX_SUCCESS) { bundle_pt bundle = NULL; - char *entry = NULL; - char *name = NULL; - char *packageName = NULL; + const char *entry = NULL; + const char *name = NULL; + const char *packageName = NULL; resource_processor_service_pt processor = processorP; bundleContext_getBundle(admin->context, &bundle); @@ -676,7 +676,7 @@ celix_status_t deploymentAdmin_processDeploymentPackageResources(deployment_admi snprintf(resourcePath, length, "%srepo/%s/%s", entry, name, info->path); deploymentPackage_getName(source, &packageName); - processor->begin(processor->processor, packageName); + processor->begin(processor->processor, (char*)packageName); processor->process(processor->processor, info->path, resourcePath); } } @@ -719,11 +719,11 @@ celix_status_t deploymentAdmin_dropDeploymentPackageResources(deployment_admin_p void *processorP = NULL; status = bundleContext_getService(admin->context, ref, &processorP); if (status == CELIX_SUCCESS) { - char *packageName = NULL; + const char *packageName = NULL; resource_processor_service_pt processor = processorP; deploymentPackage_getName(source, &packageName); - processor->begin(processor->processor, packageName); + processor->begin(processor->processor, (char*)packageName); processor->dropped(processor->processor, info->path); } } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/deployment_admin/private/src/deployment_package.c ---------------------------------------------------------------------- diff --git a/deployment_admin/private/src/deployment_package.c b/deployment_admin/private/src/deployment_package.c index 615d6da..1520db8 100644 --- a/deployment_admin/private/src/deployment_package.c +++ b/deployment_admin/private/src/deployment_package.c @@ -40,7 +40,7 @@ static const char * const DEPLOYMENTPACKAGE_CUSTOMIZER = "DeploymentPackage-Cust celix_status_t deploymentPackage_processEntries(deployment_package_pt package); static celix_status_t deploymentPackage_isBundleResource(properties_pt attributes, bool *isBundleResource); -static celix_status_t deploymentPackage_parseBooleanHeader(char *value, bool *boolValue); +static celix_status_t deploymentPackage_parseBooleanHeader(const char *value, bool *boolValue); celix_status_t deploymentPackage_create(bundle_context_pt context, manifest_pt manifest, deployment_package_pt *package) { celix_status_t status = CELIX_SUCCESS; @@ -107,7 +107,7 @@ celix_status_t deploymentPackage_destroy(deployment_package_pt package) { return status; } -celix_status_t deploymentPackage_getName(deployment_package_pt package, char **name) { +celix_status_t deploymentPackage_getName(deployment_package_pt package, const char **name) { *name = manifest_getValue(package->manifest, "DeploymentPackage-SymbolicName"); return CELIX_SUCCESS; } @@ -117,12 +117,12 @@ celix_status_t deploymentPackage_getBundleInfos(deployment_package_pt package, a return CELIX_SUCCESS; } -celix_status_t deploymentPackage_getBundleInfoByName(deployment_package_pt package, char *name, bundle_info_pt *info) { +celix_status_t deploymentPackage_getBundleInfoByName(deployment_package_pt package, const char *name, bundle_info_pt *info) { *info = hashMap_get(package->nameToBundleInfo, name); return CELIX_SUCCESS; } -celix_status_t deploymentPackage_getBundle(deployment_package_pt package, char *name, bundle_pt *bundle) { +celix_status_t deploymentPackage_getBundle(deployment_package_pt package, const char *name, bundle_pt *bundle) { if (hashMap_containsKey(package->nameToBundleInfo, name)) { array_list_pt bundles = NULL; bundleContext_getBundles(package->context, &bundles); @@ -131,7 +131,7 @@ celix_status_t deploymentPackage_getBundle(deployment_package_pt package, char * bundle_pt ibundle = arrayList_get(bundles, i); module_pt module = NULL; bundle_getCurrentModule(ibundle, &module); - char *bsn = NULL; + const char *bsn = NULL; module_getSymbolicName(module, &bsn); if (strcmp(bsn, name) == 0) { *bundle = ibundle; @@ -150,13 +150,13 @@ celix_status_t deploymentPackage_getResourceInfos(deployment_package_pt package, return CELIX_SUCCESS; } -celix_status_t deploymentPackage_getResourceInfoByPath(deployment_package_pt package, char *path, resource_info_pt *info) { +celix_status_t deploymentPackage_getResourceInfoByPath(deployment_package_pt package, const char *path, resource_info_pt *info) { *info = hashMap_get(package->pathToEntry, path); return CELIX_SUCCESS; } celix_status_t deploymentPackage_getVersion(deployment_package_pt package, version_pt *version) { - char *versionStr = manifest_getValue(package->manifest, "DeploymentPackage-Version"); + const char *versionStr = manifest_getValue(package->manifest, "DeploymentPackage-Version"); return version_createVersionFromString(versionStr, version); } @@ -204,7 +204,7 @@ static celix_status_t deploymentPackage_isBundleResource(properties_pt attribute return CELIX_SUCCESS; } -static celix_status_t deploymentPackage_parseBooleanHeader(char *value, bool *boolValue) { +static celix_status_t deploymentPackage_parseBooleanHeader(const char *value, bool *boolValue) { *boolValue = false; if (value != NULL) { if (strcmp(value, "true") == 0) { http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/device_access/device_access/private/src/device_manager.c ---------------------------------------------------------------------- diff --git a/device_access/device_access/private/src/device_manager.c b/device_access/device_access/private/src/device_manager.c index bba6be6..6e7cfd9 100644 --- a/device_access/device_access/private/src/device_manager.c +++ b/device_access/device_access/private/src/device_manager.c @@ -370,7 +370,7 @@ celix_status_t deviceManager_driverRemoved(void * handle, service_reference_pt r for (i = 0; i < arrayList_size(idleDevices); i++) { celix_status_t forStatus = CELIX_SUCCESS; service_reference_pt ref = arrayList_get(idleDevices, i); - char *bsn = NULL; + const char *bsn = NULL; bundle_pt bundle = NULL; forStatus = serviceReference_getBundle(ref, &bundle); if (forStatus == CELIX_SUCCESS) { @@ -425,7 +425,7 @@ celix_status_t deviceManager_getIdleDevices(device_manager_pt manager, array_lis while (hashMapIterator_hasNext(iter)) { celix_status_t substatus = CELIX_SUCCESS; service_reference_pt ref = hashMapIterator_nextKey(iter); - char *bsn = NULL; + const char *bsn = NULL; module_pt module = NULL; bundle_pt bundle = NULL; substatus = serviceReference_getBundle(ref, &bundle); @@ -446,7 +446,7 @@ celix_status_t deviceManager_getIdleDevices(device_manager_pt manager, array_lis celix_status_t sstatus = deviceManager_isDriverBundle(manager, bundle, &isDriver); if (sstatus == CELIX_SUCCESS) { if (isDriver) { - char *bsn = NULL; + const char *bsn = NULL; module_pt module = NULL; bundle_getCurrentModule(bundle, &module); module_getSymbolicName(module, &bsn); @@ -488,7 +488,7 @@ celix_status_t deviceManager_getIdleDevices_exmaple(device_manager_pt manager, a while (hashMapIterator_hasNext(iter)) { celix_status_t substatus = CELIX_SUCCESS; service_reference_pt ref = hashMapIterator_nextKey(iter); - char *bsn = NULL; + const char *bsn = NULL; module_pt module = NULL; bundle_pt bundle = NULL; array_list_pt bundles = NULL; @@ -507,7 +507,7 @@ celix_status_t deviceManager_getIdleDevices_exmaple(device_manager_pt manager, a celix_status_t sstatus = deviceManager_isDriverBundle(manager, bundle, &isDriver); if (sstatus == CELIX_SUCCESS) { if (isDriver) { - char *bsn = NULL; + const char *bsn = NULL; module_pt module = NULL; bundle_getCurrentModule(bundle, &module); module_getSymbolicName(module, &bsn); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/device_access/device_access/private/src/driver_attributes.c ---------------------------------------------------------------------- diff --git a/device_access/device_access/private/src/driver_attributes.c b/device_access/device_access/private/src/driver_attributes.c index db28e03..5ac7fda 100644 --- a/device_access/device_access/private/src/driver_attributes.c +++ b/device_access/device_access/private/src/driver_attributes.c @@ -59,7 +59,7 @@ celix_status_t driverAttributes_create(service_reference_pt reference, driver_se (*attributes)->driver = driver; (*attributes)->bundle = bundle; - char *location; + const char *location; status = bundleArchive_getLocation(bundleArchive, &location); if (status == CELIX_SUCCESS) { (*attributes)->dynamic = strncmp(location, DRIVER_LOCATION_PREFIX, 4) == 0 ? true : false; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/device_access/device_access/private/src/driver_matcher.c ---------------------------------------------------------------------- diff --git a/device_access/device_access/private/src/driver_matcher.c b/device_access/device_access/private/src/driver_matcher.c index f36cd4a..c7597d3 100644 --- a/device_access/device_access/private/src/driver_matcher.c +++ b/device_access/device_access/private/src/driver_matcher.c @@ -48,13 +48,13 @@ typedef struct match_key { static celix_status_t driverMatcher_get(driver_matcher_pt matcher, int key, array_list_pt *attributesV); static celix_status_t driverMatcher_getBestMatchInternal(driver_matcher_pt matcher, match_pt *match); -unsigned int driverMatcher_matchKeyHash(void * match_key) { - match_key_t key = match_key; +unsigned int driverMatcher_matchKeyHash(const void* match_key) { + match_key_t key = (match_key_t) match_key; return key->matchValue; } -int driverMatcher_matchKeyEquals(void * key, void * toCompare) { +int driverMatcher_matchKeyEquals(const void* key, const void* toCompare) { return ((match_key_t) key)->matchValue == ((match_key_t) toCompare)->matchValue; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/examples/mongoose/private/src/activator.c ---------------------------------------------------------------------- diff --git a/examples/mongoose/private/src/activator.c b/examples/mongoose/private/src/activator.c index 209ecdc..f4d9afa 100644 --- a/examples/mongoose/private/src/activator.c +++ b/examples/mongoose/private/src/activator.c @@ -44,7 +44,7 @@ celix_status_t bundleActivator_start(void * userData, bundle_context_pt context) struct userData * data = (struct userData *) userData; if (bundleContext_getBundle(context, &bundle) == CELIX_SUCCESS) { - char *entry = NULL; + const char* entry = NULL; bundle_getEntry(bundle, "root", &entry); const char *options[] = { "document_root", entry, http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/include/bundle_cache.h ---------------------------------------------------------------------- diff --git a/framework/private/include/bundle_cache.h b/framework/private/include/bundle_cache.h index 0deab40..350f33b 100644 --- a/framework/private/include/bundle_cache.h +++ b/framework/private/include/bundle_cache.h @@ -95,7 +95,7 @@ celix_status_t bundleCache_getArchives(bundle_cache_pt cache, array_list_pt *arc * - CELIX_ILLEGAL_ARGUMENT If <code>bundle_archive</code> not is null. * - CELIX_ENOMEM If allocating memory for <code>bundle_archive</code> failed. */ -celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, char * location, char *inputFile, bundle_archive_pt *archive); +celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, const char* location, const char* inputFile, bundle_archive_pt *archive); /** * Deletes the entire bundle cache. http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/include/framework_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/framework_private.h b/framework/private/include/framework_private.h index 6ed3dec..ad9335e 100644 --- a/framework/private/include/framework_private.h +++ b/framework/private/include/framework_private.h @@ -95,20 +95,20 @@ void framework_stop(framework_pt framework); FRAMEWORK_EXPORT celix_status_t fw_getProperty(framework_pt framework, const char *name, const char** value); -FRAMEWORK_EXPORT celix_status_t fw_installBundle(framework_pt framework, bundle_pt * bundle, char * location, char *inputFile); +FRAMEWORK_EXPORT celix_status_t fw_installBundle(framework_pt framework, bundle_pt * bundle, const char * location, const char *inputFile); FRAMEWORK_EXPORT celix_status_t fw_uninstallBundle(framework_pt framework, bundle_pt bundle); -FRAMEWORK_EXPORT celix_status_t framework_getBundleEntry(framework_pt framework, bundle_pt bundle, char *name, char **entry); +FRAMEWORK_EXPORT celix_status_t framework_getBundleEntry(framework_pt framework, bundle_pt bundle, const char* name, const char** entry); FRAMEWORK_EXPORT celix_status_t fw_startBundle(framework_pt framework, bundle_pt bundle, int options); -FRAMEWORK_EXPORT celix_status_t framework_updateBundle(framework_pt framework, bundle_pt bundle, char *inputFile); +FRAMEWORK_EXPORT celix_status_t framework_updateBundle(framework_pt framework, bundle_pt bundle, const char* inputFile); FRAMEWORK_EXPORT celix_status_t fw_stopBundle(framework_pt framework, bundle_pt bundle, bool record); FRAMEWORK_EXPORT celix_status_t fw_registerService(framework_pt framework, service_registration_pt * registration, bundle_pt bundle, const char* serviceName, void* svcObj, properties_pt properties); FRAMEWORK_EXPORT celix_status_t fw_registerServiceFactory(framework_pt framework, service_registration_pt * registration, bundle_pt bundle, const char* serviceName, service_factory_pt factory, properties_pt properties); FRAMEWORK_EXPORT void fw_unregisterService(service_registration_pt registration); -FRAMEWORK_EXPORT celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char* serviceName, char * filter); +FRAMEWORK_EXPORT celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char* serviceName, const char* filter); FRAMEWORK_EXPORT celix_status_t framework_ungetServiceReference(framework_pt framework, bundle_pt bundle, service_reference_pt reference); FRAMEWORK_EXPORT celix_status_t fw_getService(framework_pt framework, bundle_pt bundle, service_reference_pt reference, void** service); FRAMEWORK_EXPORT celix_status_t framework_ungetService(framework_pt framework, bundle_pt bundle, service_reference_pt reference, bool *result); @@ -139,7 +139,7 @@ FRAMEWORK_EXPORT service_reference_pt listToArray(array_list_pt list); FRAMEWORK_EXPORT celix_status_t framework_markResolvedModules(framework_pt framework, linked_list_pt wires); FRAMEWORK_EXPORT array_list_pt framework_getBundles(framework_pt framework); -FRAMEWORK_EXPORT bundle_pt framework_getBundle(framework_pt framework, char * location); +FRAMEWORK_EXPORT bundle_pt framework_getBundle(framework_pt framework, const char* location); FRAMEWORK_EXPORT bundle_pt framework_getBundleById(framework_pt framework, long id); #endif /* FRAMEWORK_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/include/manifest_parser.h ---------------------------------------------------------------------- diff --git a/framework/private/include/manifest_parser.h b/framework/private/include/manifest_parser.h index 5cfd133..d6b062b 100644 --- a/framework/private/include/manifest_parser.h +++ b/framework/private/include/manifest_parser.h @@ -37,7 +37,7 @@ typedef struct manifestParser * manifest_parser_pt; celix_status_t manifestParser_create(module_pt owner, manifest_pt manifest, manifest_parser_pt *manifest_parser); celix_status_t manifestParser_destroy(manifest_parser_pt mp); -celix_status_t manifestParser_getSymbolicName(manifest_parser_pt parser, char **symbolicName); +celix_status_t manifestParser_getAndDuplicateSymbolicName(manifest_parser_pt parser, char **symbolicName); celix_status_t manifestParser_getBundleVersion(manifest_parser_pt parser, version_pt *version); celix_status_t manifestParser_getCapabilities(manifest_parser_pt parser, linked_list_pt *capabilities); celix_status_t manifestParser_getRequirements(manifest_parser_pt parser, linked_list_pt *requirements); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/include/service_registration_private.h ---------------------------------------------------------------------- diff --git a/framework/private/include/service_registration_private.h b/framework/private/include/service_registration_private.h index 442da93..c7e7998 100644 --- a/framework/private/include/service_registration_private.h +++ b/framework/private/include/service_registration_private.h @@ -66,6 +66,6 @@ celix_status_t serviceRegistration_getService(service_registration_pt registrati celix_status_t serviceRegistration_ungetService(service_registration_pt registration, bundle_pt bundle, void **service); celix_status_t serviceRegistration_getBundle(service_registration_pt registration, bundle_pt *bundle); -celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, char **serviceName); +celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, const char **serviceName); #endif /* SERVICE_REGISTRATION_PRIVATE_H_ */ http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/bundle_archive_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/bundle_archive_mock.c b/framework/private/mock/bundle_archive_mock.c index 6493c79..b352366 100644 --- a/framework/private/mock/bundle_archive_mock.c +++ b/framework/private/mock/bundle_archive_mock.c @@ -27,7 +27,7 @@ #include "bundle_archive.h" -celix_status_t bundleArchive_create(char * archiveRoot, long id, char * location, char *inputFile, bundle_archive_pt *bundle_archive) { +celix_status_t bundleArchive_create(const char * archiveRoot, long id, const char * location, const char *inputFile, bundle_archive_pt *bundle_archive) { mock_c()->actualCall("bundleArchive_create") ->withStringParameters("archiveRoot", archiveRoot) ->withIntParameters("id", id) @@ -43,7 +43,7 @@ celix_status_t bundleArchive_createSystemBundleArchive(bundle_archive_pt *bundle return mock_c()->returnValue().value.intValue; } -celix_status_t bundleArchive_recreate(char * archiveRoot, bundle_archive_pt *bundle_archive) { +celix_status_t bundleArchive_recreate(const char * archiveRoot, bundle_archive_pt *bundle_archive) { mock_c()->actualCall("bundleArchive_recreate") ->withStringParameters("archiveRoot", archiveRoot) ->withOutputParameter("bundle_archive", (void **) bundle_archive); @@ -62,21 +62,21 @@ celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id) { return mock_c()->returnValue().value.intValue; } -celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, char **location) { +celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, const char **location) { mock_c()->actualCall("bundleArchive_getLocation") ->withPointerParameters("archive", archive) ->withOutputParameter("location", location); return mock_c()->returnValue().value.intValue; } -celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, char **archiveRoot) { +celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, const char **archiveRoot) { mock_c()->actualCall("bundleArchive_getArchiveRoot") ->withPointerParameters("archive", archive) ->withOutputParameter("archiveRoot", archiveRoot); return mock_c()->returnValue().value.intValue; } -celix_status_t bundleArchive_revise(bundle_archive_pt archive, char * location, char *inputFile) { +celix_status_t bundleArchive_revise(bundle_archive_pt archive, const char * location, const char *inputFile) { mock_c()->actualCall("bundleArchive_revise") ->withPointerParameters("archive", archive) ->withStringParameters("location", location) http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/bundle_cache_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/bundle_cache_mock.c b/framework/private/mock/bundle_cache_mock.c index ac9f61c..169a256 100644 --- a/framework/private/mock/bundle_cache_mock.c +++ b/framework/private/mock/bundle_cache_mock.c @@ -46,7 +46,7 @@ celix_status_t bundleCache_getArchives(bundle_cache_pt cache, array_list_pt *arc return mock_c()->returnValue().value.intValue; } -celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, char * location, char *inputFile, bundle_archive_pt *archive) { +celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, const char * location, const char *inputFile, bundle_archive_pt *archive) { mock_c()->actualCall("bundleCache_createArchive") ->withPointerParameters("cache", cache) ->withLongIntParameters("id", id) http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/bundle_context_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/bundle_context_mock.c b/framework/private/mock/bundle_context_mock.c index f00bade..5ef849d 100644 --- a/framework/private/mock/bundle_context_mock.c +++ b/framework/private/mock/bundle_context_mock.c @@ -53,7 +53,7 @@ celix_status_t bundleContext_getFramework(bundle_context_pt context, framework_p return mock_c()->returnValue().value.intValue; } -celix_status_t bundleContext_installBundle(bundle_context_pt context, char * location, bundle_pt *bundle) { +celix_status_t bundleContext_installBundle(bundle_context_pt context, const char * location, bundle_pt *bundle) { mock_c()->actualCall("bundleContext_installBundle") ->withPointerParameters("context", context) ->withStringParameters("location", location) @@ -61,7 +61,7 @@ celix_status_t bundleContext_installBundle(bundle_context_pt context, char * loc return mock_c()->returnValue().value.intValue; } -celix_status_t bundleContext_installBundle2(bundle_context_pt context, char * location, char *inputFile, bundle_pt *bundle) { +celix_status_t bundleContext_installBundle2(bundle_context_pt context, const char * location, const char *inputFile, bundle_pt *bundle) { mock_c()->actualCall("bundleContext_installBundle2") ->withPointerParameters("context", context) ->withStringParameters("location", location) @@ -94,7 +94,7 @@ celix_status_t bundleContext_registerServiceFactory(bundle_context_pt context, c } -celix_status_t bundleContext_getServiceReferences(bundle_context_pt context, const char * serviceName, char * filter, array_list_pt *service_references) { +celix_status_t bundleContext_getServiceReferences(bundle_context_pt context, const char * serviceName, const char * filter, array_list_pt *service_references) { mock_c()->actualCall("bundleContext_getServiceReferences") ->withPointerParameters("context", context) ->withStringParameters("serviceName", serviceName) http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/bundle_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/bundle_mock.c b/framework/private/mock/bundle_mock.c index a394d0f..98e03b3 100644 --- a/framework/private/mock/bundle_mock.c +++ b/framework/private/mock/bundle_mock.c @@ -102,7 +102,7 @@ celix_status_t bundle_setContext(bundle_pt bundle, bundle_context_pt context) { return mock_c()->returnValue().value.intValue; } -celix_status_t bundle_getEntry(bundle_pt bundle, char * name, char **entry) { +celix_status_t bundle_getEntry(bundle_pt bundle, const char * name, const char **entry) { mock_c()->actualCall("bundle_getEntry") ->withPointerParameters("bundle", bundle) ->withStringParameters("name", name) @@ -120,7 +120,7 @@ celix_status_t bundle_startWithOptions(bundle_pt bundle, int options) { return mock_c()->returnValue().value.intValue; } -celix_status_t bundle_update(bundle_pt bundle, char *inputFile) { +celix_status_t bundle_update(bundle_pt bundle, const char *inputFile) { mock_c()->actualCall("bundle_update"); return mock_c()->returnValue().value.intValue; } @@ -162,7 +162,7 @@ void uninstallBundle(bundle_pt bundle) { } -celix_status_t bundle_revise(bundle_pt bundle, char * location, char *inputFile) { +celix_status_t bundle_revise(bundle_pt bundle, const char * location, const char *inputFile) { mock_c()->actualCall("bundle_revise"); return mock_c()->returnValue().value.intValue; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/bundle_revision_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/bundle_revision_mock.c b/framework/private/mock/bundle_revision_mock.c index 0e24be5..d324ceb 100644 --- a/framework/private/mock/bundle_revision_mock.c +++ b/framework/private/mock/bundle_revision_mock.c @@ -27,7 +27,7 @@ #include "bundle_revision.h" -celix_status_t bundleRevision_create(char *root, char *location, long revisionNr, char *inputFile, bundle_revision_pt *bundle_revision) { +celix_status_t bundleRevision_create(const char *root, const char *location, long revisionNr, const char *inputFile, bundle_revision_pt *bundle_revision) { mock_c()->actualCall("bundleRevision_create") ->withStringParameters("root", root) ->withStringParameters("location", location) @@ -49,14 +49,14 @@ celix_status_t bundleRevision_getNumber(bundle_revision_pt revision, long *revis return mock_c()->returnValue().value.intValue; } -celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, char **location) { +celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, const char **location) { mock_c()->actualCall("bundleRevision_getLocation") ->withPointerParameters("revision", revision) ->withOutputParameter("location", location); return mock_c()->returnValue().value.intValue; } -celix_status_t bundleRevision_getRoot(bundle_revision_pt revision, char **root) { +celix_status_t bundleRevision_getRoot(bundle_revision_pt revision, const char **root) { mock_c()->actualCall("bundleRevision_getRoot") ->withPointerParameters("revision", revision) ->withOutputParameter("root", root); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/capability_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/capability_mock.c b/framework/private/mock/capability_mock.c index 324e8d0..a908ea2 100644 --- a/framework/private/mock/capability_mock.c +++ b/framework/private/mock/capability_mock.c @@ -42,7 +42,7 @@ celix_status_t capability_destroy(capability_pt capability) { return mock_c()->returnValue().value.intValue; } -celix_status_t capability_getServiceName(capability_pt capability, char **serviceName) { +celix_status_t capability_getServiceName(capability_pt capability, const char **serviceName) { mock_c()->actualCall("capability_getServiceName") ->withPointerParameters("capability", capability) ->withOutputParameter("serviceName", serviceName); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/celix_log_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/celix_log_mock.c b/framework/private/mock/celix_log_mock.c index 38dd0ae..26ebb7e 100644 --- a/framework/private/mock/celix_log_mock.c +++ b/framework/private/mock/celix_log_mock.c @@ -30,16 +30,16 @@ #include "celix_errno.h" #include "celix_log.h" -static void test_logger_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, char *fmsg, ...); -static void test_logger_print(framework_log_level_t level, const char *func, const char *file, int line, char *msg); +static void test_logger_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, const char *fmsg, ...); +static void test_logger_print(framework_log_level_t level, const char *func, const char *file, int line, const char *msg); -void framework_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, char *fmsg, ...) { +void framework_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, const char *fmsg, ...) { mock_c()->actualCall("framework_log"); test_logger_log(logger, level, func, file, line, "%s", fmsg); } -void framework_logCode(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, celix_status_t code, char *fmsg, ...) { +void framework_logCode(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, celix_status_t code, const char *fmsg, ...) { mock_c()->actualCall("framework_logCode")->withIntParameters("code", code); char message[256]; celix_strerror(code, message, 256); @@ -53,7 +53,7 @@ void framework_logCode(framework_logger_pt logger, framework_log_level_t level, va_end(listPointer); } -celix_status_t frameworkLogger_log(framework_log_level_t level, const char *func, const char *file, int line, char *msg) { +celix_status_t frameworkLogger_log(framework_log_level_t level, const char *func, const char *file, int line, const char *msg) { mock_c()->actualCall("frameworkLogger_log"); test_logger_print(level, func, file, line, msg); @@ -62,7 +62,7 @@ celix_status_t frameworkLogger_log(framework_log_level_t level, const char *func } //test logger functions, let you read the logged errors -static void test_logger_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, char *fmsg, ...) { +static void test_logger_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, const char *fmsg, ...) { char msg[512]; va_list listPointer; va_start(listPointer, fmsg); @@ -73,7 +73,7 @@ static void test_logger_log(framework_logger_pt logger, framework_log_level_t le va_end(listPointer); } -static void test_logger_print(framework_log_level_t level, const char *func, const char *file, int line, char *msg) { +static void test_logger_print(framework_log_level_t level, const char *func, const char *file, int line, const char *msg) { char *levelStr = NULL; switch (level) { case OSGI_FRAMEWORK_LOG_ERROR: http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/filter_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/filter_mock.c b/framework/private/mock/filter_mock.c index 4836df1..d2fc75c 100644 --- a/framework/private/mock/filter_mock.c +++ b/framework/private/mock/filter_mock.c @@ -46,7 +46,7 @@ celix_status_t filter_match(filter_pt filter, properties_pt properties, bool *re return mock_c()->returnValue().value.intValue; } -celix_status_t filter_getString(filter_pt filter, char **filterStr) { +celix_status_t filter_getString(filter_pt filter, const char **filterStr) { mock_c()->actualCall("filter_getString") ->withPointerParameters("filter", filter) ->withOutputParameter("filterStr", filterStr); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/framework_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/framework_mock.c b/framework/private/mock/framework_mock.c index ab01218..d7a6978 100644 --- a/framework/private/mock/framework_mock.c +++ b/framework/private/mock/framework_mock.c @@ -59,7 +59,7 @@ celix_status_t fw_getProperty(framework_pt framework, const char *name, const ch return mock_c()->returnValue().value.intValue; } -celix_status_t fw_installBundle(framework_pt framework, bundle_pt * bundle, char * location, char *inputFile) { +celix_status_t fw_installBundle(framework_pt framework, bundle_pt * bundle, const char * location, const char *inputFile) { mock_c()->actualCall("fw_installBundle") ->withPointerParameters("framework", framework) ->withStringParameters("location", location) @@ -75,7 +75,7 @@ celix_status_t fw_uninstallBundle(framework_pt framework, bundle_pt bundle) { return mock_c()->returnValue().value.intValue; } -celix_status_t framework_getBundleEntry(framework_pt framework, bundle_pt bundle, char *name, char **entry) { +celix_status_t framework_getBundleEntry(framework_pt framework, bundle_pt bundle, const char *name, const char **entry) { mock_c()->actualCall("framework_getBundleEntry") ->withPointerParameters("framework", framework) ->withPointerParameters("bundle", bundle) @@ -93,7 +93,7 @@ celix_status_t fw_startBundle(framework_pt framework, bundle_pt bundle, int opti return mock_c()->returnValue().value.intValue; } -celix_status_t framework_updateBundle(framework_pt framework, bundle_pt bundle, char *inputFile) { +celix_status_t framework_updateBundle(framework_pt framework, bundle_pt bundle, const char *inputFile) { mock_c()->actualCall("framework_updateBundle") ->withPointerParameters("framework", framework) ->withPointerParameters("bundle", bundle) @@ -137,7 +137,7 @@ void fw_unregisterService(service_registration_pt registration) { } -celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char * serviceName, char * filter) { +celix_status_t fw_getServiceReferences(framework_pt framework, array_list_pt *references, bundle_pt bundle, const char * serviceName, const char * filter) { mock_c()->actualCall("fw_getServiceReferences") ->withPointerParameters("framework", framework) ->withPointerParameters("bundle", bundle) @@ -296,7 +296,7 @@ array_list_pt framework_getBundles(framework_pt framework) { return mock_c()->returnValue().value.pointerValue; } -bundle_pt framework_getBundle(framework_pt framework, char * location) { +bundle_pt framework_getBundle(framework_pt framework, const char* location) { mock_c()->actualCall("framework_getBundle") ->withPointerParameters("framework", framework) ->withStringParameters("location", location); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/manifest_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/manifest_mock.c b/framework/private/mock/manifest_mock.c index b5d1fc7..b0f514a 100644 --- a/framework/private/mock/manifest_mock.c +++ b/framework/private/mock/manifest_mock.c @@ -33,7 +33,7 @@ celix_status_t manifest_create(manifest_pt *manifest) { return mock_c()->returnValue().value.intValue; } -celix_status_t manifest_createFromFile(char *filename, manifest_pt *manifest) { +celix_status_t manifest_createFromFile(const char *filename, manifest_pt *manifest) { mock_c()->actualCall("manifest_createFromFile") ->withStringParameters("filename", filename) ->withOutputParameter("manifest", (void **) manifest); @@ -61,16 +61,16 @@ celix_status_t manifest_getEntries(manifest_pt manifest, hash_map_pt *map) { return mock_c()->returnValue().value.intValue; } -celix_status_t manifest_read(manifest_pt manifest, char *filename) { +celix_status_t manifest_read(manifest_pt manifest, const char *filename) { mock_c()->actualCall("manifest_read"); return mock_c()->returnValue().value.intValue; } -void manifest_write(manifest_pt manifest, char * filename) { +void manifest_write(manifest_pt manifest, const char * filename) { mock_c()->actualCall("manifest_write"); } -char * manifest_getValue(manifest_pt manifest, const char * name) { +const char * manifest_getValue(manifest_pt manifest, const char * name) { mock_c()->actualCall("manifest_getValue") ->withStringParameters("name", name); return (char *) mock_c()->returnValue().value.stringValue; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/manifest_parser_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/manifest_parser_mock.c b/framework/private/mock/manifest_parser_mock.c index 34b02fa..c9ba693 100644 --- a/framework/private/mock/manifest_parser_mock.c +++ b/framework/private/mock/manifest_parser_mock.c @@ -41,7 +41,7 @@ celix_status_t manifestParser_destroy(manifest_parser_pt manifest_parser) { return mock_c()->returnValue().value.intValue; } -celix_status_t manifestParser_getSymbolicName(manifest_parser_pt parser, char **symbolicName) { +celix_status_t manifestParser_getAndDuplicateSymbolicName(manifest_parser_pt parser, char **symbolicName) { mock_c()->actualCall("manifestParser_getSymbolicName") ->withPointerParameters("parser", parser) ->withOutputParameter("symbolicName", (void**) symbolicName); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/miniunz_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/miniunz_mock.c b/framework/private/mock/miniunz_mock.c index be5dba2..357bf31 100644 --- a/framework/private/mock/miniunz_mock.c +++ b/framework/private/mock/miniunz_mock.c @@ -27,7 +27,7 @@ #include "archive.h" -celix_status_t extractBundle(char * bundleName, char * revisionRoot) { +celix_status_t extractBundle(const char * bundleName, const char * revisionRoot) { mock_c()->actualCall("extractBundle") ->withStringParameters("bundleName", bundleName) ->withStringParameters("revisionRoot", revisionRoot); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/module_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/module_mock.c b/framework/private/mock/module_mock.c index 36c70ca..989dd05 100644 --- a/framework/private/mock/module_mock.c +++ b/framework/private/mock/module_mock.c @@ -27,7 +27,7 @@ #include "module.h" -module_pt module_create(manifest_pt headerMap, char * moduleId, bundle_pt bundle) { +module_pt module_create(manifest_pt headerMap, const char * moduleId, bundle_pt bundle) { mock_c()->actualCall("module_create") ->withPointerParameters("headerMap", headerMap) ->withStringParameters("moduleId", moduleId) @@ -55,7 +55,7 @@ int module_equals(void * module, void * compare) { return mock_c()->returnValue().value.intValue; } -wire_pt module_getWire(module_pt module, char * serviceName) { +wire_pt module_getWire(module_pt module, const char * serviceName) { mock_c()->actualCall("module_getwire"); return mock_c()->returnValue().value.pointerValue; } @@ -66,7 +66,7 @@ version_pt module_getVersion(module_pt module) { return mock_c()->returnValue().value.pointerValue; } -celix_status_t module_getSymbolicName(module_pt module, char **symbolicName) { +celix_status_t module_getSymbolicName(module_pt module, const char **symbolicName) { mock_c()->actualCall("module_getSymbolicName") ->withPointerParameters("module", module) ->withOutputParameter("symbolicName", (const char **) symbolicName); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/requirement_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/requirement_mock.c b/framework/private/mock/requirement_mock.c index 6282e7d..101bdce 100644 --- a/framework/private/mock/requirement_mock.c +++ b/framework/private/mock/requirement_mock.c @@ -48,7 +48,7 @@ celix_status_t requirement_getVersionRange(requirement_pt requirement, version_r return mock_c()->returnValue().value.intValue; } -celix_status_t requirement_getTargetName(requirement_pt requirement, char **targetName) { +celix_status_t requirement_getTargetName(requirement_pt requirement, const char **targetName) { mock_c()->actualCall("requirement_getTargetName") ->withPointerParameters("requirement", requirement) ->withOutputParameter("targetName", targetName); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/service_reference_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/service_reference_mock.c b/framework/private/mock/service_reference_mock.c index 9d8d4db..c5286b9 100644 --- a/framework/private/mock/service_reference_mock.c +++ b/framework/private/mock/service_reference_mock.c @@ -164,10 +164,10 @@ celix_status_t serviceReference_equals(service_reference_pt reference, service_r return mock_c()->returnValue().value.intValue; } -int serviceReference_equals2(void *reference1, void *reference2) { +int serviceReference_equals2(const void *reference1, const void *reference2) { mock_c()->actualCall("serviceReference_equals2") - ->withPointerParameters("reference1", reference1) - ->withPointerParameters("reference2", reference2); + ->withPointerParameters("reference1", (void*)reference1) + ->withPointerParameters("reference2", (void*)reference2); return mock_c()->returnValue().value.intValue; } @@ -179,7 +179,7 @@ celix_status_t serviceReference_compareTo(service_reference_pt reference, servic return mock_c()->returnValue().value.intValue; } -unsigned int serviceReference_hashCode(void *referenceP) { +unsigned int serviceReference_hashCode(const void *referenceP) { mock_c()->actualCall("serviceReference_hashCode"); return mock_c()->returnValue().value.intValue; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/service_registration_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/service_registration_mock.c b/framework/private/mock/service_registration_mock.c index 5ace85d..e50211c 100644 --- a/framework/private/mock/service_registration_mock.c +++ b/framework/private/mock/service_registration_mock.c @@ -120,7 +120,7 @@ celix_status_t serviceRegistration_getBundle(service_registration_pt registratio return mock_c()->returnValue().value.intValue; } -celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, char **serviceName) { +celix_status_t serviceRegistration_getServiceName(service_registration_pt registration, const char **serviceName) { mock_c()->actualCall("serviceRegistration_getServiceName") ->withPointerParameters("registration", registration) ->withOutputParameter("serviceName", (const char **) serviceName); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/mock/version_mock.c ---------------------------------------------------------------------- diff --git a/framework/private/mock/version_mock.c b/framework/private/mock/version_mock.c index c965d4f..79517aa 100644 --- a/framework/private/mock/version_mock.c +++ b/framework/private/mock/version_mock.c @@ -50,7 +50,7 @@ celix_status_t version_clone(version_pt version, version_pt *clone) { return mock_c()->returnValue().value.intValue; } -celix_status_t version_createVersionFromString(char * versionStr, version_pt *version) { +celix_status_t version_createVersionFromString(const char * versionStr, version_pt *version) { mock_c()->actualCall("version_createVersionFromString") ->withStringParameters("versionStr", versionStr) ->withOutputParameter("version", (void **) version); @@ -84,7 +84,7 @@ celix_status_t version_getMicro(version_pt version, int *micro) { return mock_c()->returnValue().value.intValue; } -celix_status_t version_getQualifier(version_pt version, char **qualifier) { +celix_status_t version_getQualifier(version_pt version, const char **qualifier) { mock_c()->actualCall("version_getQualifier") ->withPointerParameters("version", version) ->withOutputParameter("qualifier", qualifier); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/bundle.c ---------------------------------------------------------------------- diff --git a/framework/private/src/bundle.c b/framework/private/src/bundle.c index 2cdb3fc..8e50a42 100644 --- a/framework/private/src/bundle.c +++ b/framework/private/src/bundle.c @@ -184,7 +184,7 @@ celix_status_t bundle_setContext(bundle_pt bundle, bundle_context_pt context) { return CELIX_SUCCESS; } -celix_status_t bundle_getEntry(bundle_pt bundle, char * name, char **entry) { +celix_status_t bundle_getEntry(bundle_pt bundle, const char* name, const char** entry) { return framework_getBundleEntry(bundle->framework, bundle, name, entry); } @@ -223,7 +223,7 @@ celix_status_t bundle_createModule(bundle_pt bundle, module_pt *module) { if (*module != NULL) { version_pt bundleVersion = module_getVersion(*module); - char * symName = NULL; + const char * symName = NULL; status = module_getSymbolicName(*module, &symName); if (status == CELIX_SUCCESS) { array_list_pt bundles = framework_getBundles(bundle->framework); @@ -235,7 +235,7 @@ celix_status_t bundle_createModule(bundle_pt bundle, module_pt *module) { if (bundleArchive_getId(check->archive, &id) == CELIX_SUCCESS) { if (id != bundleId) { module_pt mod = NULL; - char * sym = NULL; + const char * sym = NULL; version_pt version; int cmp; status = bundle_getCurrentModule(check, &mod); @@ -289,7 +289,7 @@ celix_status_t bundle_startWithOptions(bundle_pt bundle, int options) { return status; } -celix_status_t bundle_update(bundle_pt bundle, char *inputFile) { +celix_status_t bundle_update(bundle_pt bundle, const char *inputFile) { celix_status_t status = CELIX_SUCCESS; if (bundle != NULL) { bool systemBundle = false; @@ -383,7 +383,7 @@ celix_status_t bundle_setPersistentStateUninstalled(bundle_pt bundle) { return status; } -celix_status_t bundle_revise(bundle_pt bundle, char * location, char *inputFile) { +celix_status_t bundle_revise(bundle_pt bundle, const char * location, const char *inputFile) { celix_status_t status; bundle_archive_pt archive = NULL; @@ -675,7 +675,7 @@ celix_status_t bundle_getFramework(bundle_pt bundle, framework_pt *framework) { return status; } -celix_status_t bundle_getBundleLocation(bundle_pt bundle, char **location){ +celix_status_t bundle_getBundleLocation(bundle_pt bundle, const char **location){ celix_status_t status; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/bundle_archive.c ---------------------------------------------------------------------- diff --git a/framework/private/src/bundle_archive.c b/framework/private/src/bundle_archive.c index 5f851c3..eee53b3 100644 --- a/framework/private/src/bundle_archive.c +++ b/framework/private/src/bundle_archive.c @@ -50,14 +50,14 @@ struct bundleArchive { }; static celix_status_t bundleArchive_getRevisionLocation(bundle_archive_pt archive, long revNr, char **revision_location); -static celix_status_t bundleArchive_setRevisionLocation(bundle_archive_pt archive, char * location, long revNr); +static celix_status_t bundleArchive_setRevisionLocation(bundle_archive_pt archive, const char * location, long revNr); static celix_status_t bundleArchive_initialize(bundle_archive_pt archive); -static celix_status_t bundleArchive_deleteTree(bundle_archive_pt archive, char * directory); +static celix_status_t bundleArchive_deleteTree(bundle_archive_pt archive, const char * directory); -static celix_status_t bundleArchive_createRevisionFromLocation(bundle_archive_pt archive, char *location, char *inputFile, long revNr, bundle_revision_pt *bundle_revision); -static celix_status_t bundleArchive_reviseInternal(bundle_archive_pt archive, bool isReload, long revNr, char * location, char *inputFile); +static celix_status_t bundleArchive_createRevisionFromLocation(bundle_archive_pt archive, const char *location, const char *inputFile, long revNr, bundle_revision_pt *bundle_revision); +static celix_status_t bundleArchive_reviseInternal(bundle_archive_pt archive, bool isReload, long revNr, const char * location, const char *inputFile); static celix_status_t bundleArchive_readLastModified(bundle_archive_pt archive, time_t *time); static celix_status_t bundleArchive_writeLastModified(bundle_archive_pt archive); @@ -99,7 +99,7 @@ celix_status_t bundleArchive_createSystemBundleArchive(bundle_archive_pt *bundle return status; } -celix_status_t bundleArchive_create(char * archiveRoot, long id, char * location, char *inputFile, bundle_archive_pt *bundle_archive) { +celix_status_t bundleArchive_create(const char *archiveRoot, long id, const char * location, const char *inputFile, bundle_archive_pt *bundle_archive) { celix_status_t status = CELIX_SUCCESS; char *error = NULL; bundle_archive_pt archive = NULL; @@ -174,7 +174,7 @@ celix_status_t bundleArchive_destroy(bundle_archive_pt archive) { return status; } -celix_status_t bundleArchive_recreate(char * archiveRoot, bundle_archive_pt *bundle_archive) { +celix_status_t bundleArchive_recreate(const char * archiveRoot, bundle_archive_pt *bundle_archive) { celix_status_t status = CELIX_SUCCESS; bundle_archive_pt archive = NULL; @@ -267,7 +267,7 @@ celix_status_t bundleArchive_getId(bundle_archive_pt archive, long *id) { return status; } -celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, char **location) { +celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, const char **location) { celix_status_t status = CELIX_SUCCESS; if (archive->location == NULL) { FILE *bundleLocationFile; @@ -291,7 +291,7 @@ celix_status_t bundleArchive_getLocation(bundle_archive_pt archive, char **locat return status; } -celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, char **archiveRoot) { +celix_status_t bundleArchive_getArchiveRoot(bundle_archive_pt archive, const char **archiveRoot) { *archiveRoot = archive->archiveRoot; return CELIX_SUCCESS; } @@ -536,7 +536,7 @@ static celix_status_t bundleArchive_writeLastModified(bundle_archive_pt archive) return status; } -celix_status_t bundleArchive_revise(bundle_archive_pt archive, char * location, char *inputFile) { +celix_status_t bundleArchive_revise(bundle_archive_pt archive, const char * location, const char *inputFile) { celix_status_t status = CELIX_SUCCESS; long revNr = 0l; if (!linkedList_isEmpty(archive->revisions)) { @@ -553,7 +553,7 @@ celix_status_t bundleArchive_revise(bundle_archive_pt archive, char * location, return status; } -static celix_status_t bundleArchive_reviseInternal(bundle_archive_pt archive, bool isReload, long revNr, char * location, char *inputFile) { +static celix_status_t bundleArchive_reviseInternal(bundle_archive_pt archive, bool isReload, long revNr, const char * location, const char *inputFile) { celix_status_t status = CELIX_SUCCESS; bundle_revision_pt revision = NULL; @@ -581,7 +581,7 @@ celix_status_t bundleArchive_rollbackRevise(bundle_archive_pt archive, bool *rol return CELIX_SUCCESS; } -static celix_status_t bundleArchive_createRevisionFromLocation(bundle_archive_pt archive, char *location, char *inputFile, long revNr, bundle_revision_pt *bundle_revision) { +static celix_status_t bundleArchive_createRevisionFromLocation(bundle_archive_pt archive, const char *location, const char *inputFile, long revNr, bundle_revision_pt *bundle_revision) { celix_status_t status = CELIX_SUCCESS; char root[256]; long refreshCount; @@ -635,7 +635,7 @@ static celix_status_t bundleArchive_getRevisionLocation(bundle_archive_pt archiv return status; } -static celix_status_t bundleArchive_setRevisionLocation(bundle_archive_pt archive, char * location, long revNr) { +static celix_status_t bundleArchive_setRevisionLocation(bundle_archive_pt archive, const char * location, long revNr) { celix_status_t status = CELIX_SUCCESS; char revisionLocation[256]; @@ -733,7 +733,7 @@ static celix_status_t bundleArchive_initialize(bundle_archive_pt archive) { return status; } -static celix_status_t bundleArchive_deleteTree(bundle_archive_pt archive, char * directory) { +static celix_status_t bundleArchive_deleteTree(bundle_archive_pt archive, const char * directory) { DIR *dir; celix_status_t status = CELIX_SUCCESS; dir = opendir(directory); http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/bundle_cache.c ---------------------------------------------------------------------- diff --git a/framework/private/src/bundle_cache.c b/framework/private/src/bundle_cache.c index 34fd806..1572bc0 100644 --- a/framework/private/src/bundle_cache.c +++ b/framework/private/src/bundle_cache.c @@ -153,7 +153,7 @@ celix_status_t bundleCache_getArchives(bundle_cache_pt cache, array_list_pt *arc return status; } -celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, char * location, char *inputFile, bundle_archive_pt *bundle_archive) { +celix_status_t bundleCache_createArchive(bundle_cache_pt cache, long id, const char * location, const char *inputFile, bundle_archive_pt *bundle_archive) { celix_status_t status = CELIX_SUCCESS; char archiveRoot[512]; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/bundle_context.c ---------------------------------------------------------------------- diff --git a/framework/private/src/bundle_context.c b/framework/private/src/bundle_context.c index 5eb903a..86cad33 100644 --- a/framework/private/src/bundle_context.c +++ b/framework/private/src/bundle_context.c @@ -98,11 +98,11 @@ celix_status_t bundleContext_getFramework(bundle_context_pt context, framework_p return status; } -celix_status_t bundleContext_installBundle(bundle_context_pt context, char * location, bundle_pt *bundle) { +celix_status_t bundleContext_installBundle(bundle_context_pt context, const char * location, bundle_pt *bundle) { return bundleContext_installBundle2(context, location, NULL, bundle); } -celix_status_t bundleContext_installBundle2(bundle_context_pt context, char * location, char *inputFile, bundle_pt *bundle) { +celix_status_t bundleContext_installBundle2(bundle_context_pt context, const char * location, const char *inputFile, bundle_pt *bundle) { celix_status_t status = CELIX_SUCCESS; bundle_pt b = NULL; @@ -155,7 +155,7 @@ celix_status_t bundleContext_registerServiceFactory(bundle_context_pt context, c return status; } -celix_status_t bundleContext_getServiceReferences(bundle_context_pt context, const char * serviceName, char * filter, array_list_pt *service_references) { +celix_status_t bundleContext_getServiceReferences(bundle_context_pt context, const char * serviceName, const char * filter, array_list_pt *service_references) { celix_status_t status = CELIX_SUCCESS; if (context != NULL && *service_references == NULL) { http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/bundle_revision.c ---------------------------------------------------------------------- diff --git a/framework/private/src/bundle_revision.c b/framework/private/src/bundle_revision.c index 6c538f9..b0d993c 100644 --- a/framework/private/src/bundle_revision.c +++ b/framework/private/src/bundle_revision.c @@ -34,7 +34,7 @@ #include "archive.h" #include "celix_log.h" -celix_status_t bundleRevision_create(char *root, char *location, long revisionNr, char *inputFile, bundle_revision_pt *bundle_revision) { +celix_status_t bundleRevision_create(const char *root, const char *location, long revisionNr, const char *inputFile, bundle_revision_pt *bundle_revision) { celix_status_t status = CELIX_SUCCESS; bundle_revision_pt revision = NULL; @@ -102,7 +102,7 @@ celix_status_t bundleRevision_getNumber(bundle_revision_pt revision, long *revis return status; } -celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, char **location) { +celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, const char **location) { celix_status_t status = CELIX_SUCCESS; if (revision == NULL) { status = CELIX_ILLEGAL_ARGUMENT; @@ -115,7 +115,7 @@ celix_status_t bundleRevision_getLocation(bundle_revision_pt revision, char **lo return status; } -celix_status_t bundleRevision_getRoot(bundle_revision_pt revision, char **root) { +celix_status_t bundleRevision_getRoot(bundle_revision_pt revision, const char **root) { celix_status_t status = CELIX_SUCCESS; if (revision == NULL) { status = CELIX_ILLEGAL_ARGUMENT; http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/capability.c ---------------------------------------------------------------------- diff --git a/framework/private/src/capability.c b/framework/private/src/capability.c index 5ca66ea..9e4dc3a 100644 --- a/framework/private/src/capability.c +++ b/framework/private/src/capability.c @@ -84,7 +84,7 @@ celix_status_t capability_destroy(capability_pt capability) { return CELIX_SUCCESS; } -celix_status_t capability_getServiceName(capability_pt capability, char **serviceName) { +celix_status_t capability_getServiceName(capability_pt capability, const char **serviceName) { *serviceName = capability->serviceName; return CELIX_SUCCESS; } http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/celix_log.c ---------------------------------------------------------------------- diff --git a/framework/private/src/celix_log.c b/framework/private/src/celix_log.c index 7c7e14f..c4d51e2 100644 --- a/framework/private/src/celix_log.c +++ b/framework/private/src/celix_log.c @@ -28,7 +28,7 @@ #include "celix_errno.h" #include "celix_log.h" -void framework_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, char *fmsg, ...) { +void framework_log(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, const char *fmsg, ...) { char msg[512]; va_list listPointer; va_start(listPointer, fmsg); @@ -42,7 +42,7 @@ void framework_log(framework_logger_pt logger, framework_log_level_t level, cons va_end(listPointer); } -void framework_logCode(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, celix_status_t code, char *fmsg, ...) { +void framework_logCode(framework_logger_pt logger, framework_log_level_t level, const char *func, const char *file, int line, celix_status_t code, const char *fmsg, ...) { char message[256]; celix_strerror(code, message, 256); char msg[512]; @@ -55,7 +55,7 @@ void framework_logCode(framework_logger_pt logger, framework_log_level_t level, va_end(listPointer); } -celix_status_t frameworkLogger_log(framework_log_level_t level, const char *func, const char *file, int line, char *msg) { +celix_status_t frameworkLogger_log(framework_log_level_t level, const char *func, const char *file, int line, const char *msg) { char *levelStr = NULL; switch (level) { case OSGI_FRAMEWORK_LOG_ERROR: http://git-wip-us.apache.org/repos/asf/celix/blob/6f85bf3c/framework/private/src/filter.c ---------------------------------------------------------------------- diff --git a/framework/private/src/filter.c b/framework/private/src/filter.c index 032745f..671a1e0 100644 --- a/framework/private/src/filter.c +++ b/framework/private/src/filter.c @@ -663,7 +663,7 @@ static celix_status_t filter_compareString(OPERAND operand, char * string, void return CELIX_SUCCESS; } -celix_status_t filter_getString(filter_pt filter, char **filterStr) { +celix_status_t filter_getString(filter_pt filter, const char **filterStr) { if (filter != NULL) { *filterStr = filter->filterStr; }
