[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] JavaHL: Reduce amount of duplicate code used to check C++ pointer extracted from the java object

From: Vladimir Berezniker <vmpn_at_hitechman.com>
Date: Thu, 31 May 2012 00:43:44 -0400

Patch 01 - Introduce macro

[[[
JavaHL: Added CPPADDR_NULL_PTR macro to reduce amount of duplicate code
checking C++ pointer extracted from the java object

[ in subversion/bindings/javahl/native ]

* JNIUtil.h
  (CPPADDR_NULL_PTR): New macro to test for NULL pointer and raise java
    exception if necessary
]]]

Patch 02 - Change existing code to use the new macro

[[[
JavaHL: Migrate existing code to the CPPADDR_NULL_PTR macro to reduce amount
of duplicate code

[ in subversion/bindings/javahl/native ]

* org_apache_subversion_javahl_SVNClient.cpp
  (Java_org_apache_subversion_javahl_SVNClient_dispose,
   Java_org_apache_subversion_javahl_SVNClient_getAdminDirectoryName,
   Java_org_apache_subversion_javahl_SVNClient_isAdminDirectory,
   Java_org_apache_subversion_javahl_SVNClient_getLastPath,
   Java_org_apache_subversion_javahl_SVNClient_username,
   Java_org_apache_subversion_javahl_SVNClient_password,
   Java_org_apache_subversion_javahl_SVNClient_setPrompt,
   Java_org_apache_subversion_javahl_SVNClient_logMessages,
   Java_org_apache_subversion_javahl_SVNClient_checkout,
   Java_org_apache_subversion_javahl_SVNClient_remove,
   Java_org_apache_subversion_javahl_SVNClient_revert,
   Java_org_apache_subversion_javahl_SVNClient_add,
   Java_org_apache_subversion_javahl_SVNClient_update,
   Java_org_apache_subversion_javahl_SVNClient_commit,
   Java_org_apache_subversion_javahl_SVNClient_copy,
   Java_org_apache_subversion_javahl_SVNClient_move,
   Java_org_apache_subversion_javahl_SVNClient_mkdir,
   Java_org_apache_subversion_javahl_SVNClient_cleanup,
   Java_org_apache_subversion_javahl_SVNClient_resolve,
   Java_org_apache_subversion_javahl_SVNClient_doExport,
   Java_org_apache_subversion_javahl_SVNClient_doSwitch,
   Java_org_apache_subversion_javahl_SVNClient_doImport,

 Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2ZLorg_apache_subversion_javahl_types_Depth_2ZZZ,
   Java_org_apache_subversion_javahl_SVNClient_suggestMergeSources,

 Java_org_apache_subversion_javahl_SVNClient_merge__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_util_List_2Ljava_lang_String_2ZLorg_apache_subversion_javahl_types_Depth_2ZZZ,
   Java_org_apache_subversion_javahl_SVNClient_mergeReintegrate,
   Java_org_apache_subversion_javahl_SVNClient_properties,
   Java_org_apache_subversion_javahl_SVNClient_propertySetRemote,
   Java_org_apache_subversion_javahl_SVNClient_propertySetLocal,
   Java_org_apache_subversion_javahl_SVNClient_revProperty,
   Java_org_apache_subversion_javahl_SVNClient_revProperties,
   Java_org_apache_subversion_javahl_SVNClient_setRevProperty,
   Java_org_apache_subversion_javahl_SVNClient_propertyGet,
   Java_org_apache_subversion_javahl_SVNClient_getMergeinfo,
   Java_org_apache_subversion_javahl_SVNClient_getMergeinfoLog,

 Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZ,

 Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZ,

 Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2,

 Java_org_apache_subversion_javahl_SVNClient_diffSummarize__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZLorg_apache_subversion_javahl_callback_DiffSummaryCallback_2,
   Java_org_apache_subversion_javahl_SVNClient_streamFileContent,
   Java_org_apache_subversion_javahl_SVNClient_getVersionInfo,
   Java_org_apache_subversion_javahl_SVNClient_upgrade,
   Java_org_apache_subversion_javahl_SVNClient_relocate,
   Java_org_apache_subversion_javahl_SVNClient_blame,
   Java_org_apache_subversion_javahl_SVNClient_setConfigDirectory,
   Java_org_apache_subversion_javahl_SVNClient_getConfigDirectory,
   Java_org_apache_subversion_javahl_SVNClient_addToChangelist,
   Java_org_apache_subversion_javahl_SVNClient_removeFromChangelists,
   Java_org_apache_subversion_javahl_SVNClient_getChangelists,
   Java_org_apache_subversion_javahl_SVNClient_lock,
   Java_org_apache_subversion_javahl_SVNClient_unlock,
   Java_org_apache_subversion_javahl_SVNClient_info2,
Java_org_apache_subversion_javahl_SVNClient_patch):
    Switched to CPPADDR_NULL_PTR

* org_apache_subversion_javahl_SVNRepos.cpp,
  (Java_org_apache_subversion_javahl_SVNRepos_dispose,
   Java_org_apache_subversion_javahl_SVNRepos_create,
   Java_org_apache_subversion_javahl_SVNRepos_deltify,
   Java_org_apache_subversion_javahl_SVNRepos_dump,
   Java_org_apache_subversion_javahl_SVNRepos_hotcopy,
   Java_org_apache_subversion_javahl_SVNRepos_listDBLogs,
   Java_org_apache_subversion_javahl_SVNRepos_listUnusedDBLogs,
   Java_org_apache_subversion_javahl_SVNRepos_load,
   Java_org_apache_subversion_javahl_SVNRepos_lstxns,
   Java_org_apache_subversion_javahl_SVNRepos_recover,
   Java_org_apache_subversion_javahl_SVNRepos_rmtxns,
   Java_org_apache_subversion_javahl_SVNRepos_setRevProp,
   Java_org_apache_subversion_javahl_SVNRepos_verify,
   Java_org_apache_subversion_javahl_SVNRepos_lslocks,
   Java_org_apache_subversion_javahl_SVNRepos_rmlocks,
   Java_org_apache_subversion_javahl_SVNRepos_upgrade,
   Java_org_apache_subversion_javahl_SVNRepos_pack,
   Java_org_apache_subversion_javahl_SVNRepos_cancelOperation):
    Switched to CPPADDR_NULL_PTR
]]]

Regards,

Vladimir

Received on 2012-05-31 06:44:22 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.