You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/25 17:29:53 UTC
svn commit: r1507012 [4/11] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ contrib/client-side/emacs/ doc/programmer/
notes/http-and-webdav/ subversion/ subversion/bi...
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Thu Jul 25 15:29:49 2013
@@ -29,7 +29,9 @@ import org.apache.subversion.javahl.type
import java.util.Arrays;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Date;
+import java.util.List;
import java.util.Set;
import java.util.Map;
import java.util.HashMap;
@@ -307,8 +309,20 @@ public class SVNRemoteTests extends SVNT
}
catch (ClientException ex)
{
- assertEquals("Disabled repository feature",
- ex.getAllMessages().get(0).getMessage());
+ ClientException.ErrorMessage error = null;
+ for (ClientException.ErrorMessage m : ex.getAllMessages())
+ if (!m.isGeneric()) {
+ error = m;
+ break;
+ }
+
+ if (error == null)
+ fail("Failed with no error message");
+
+ if (error.getCode() != 175002 && // SVN_ERR_RA_DAV_REQUEST_FAILED
+ error.getCode() != 165006) // SVN_ERR_REPOS_DISABLED_FEATURE
+ fail(error.getMessage());
+
return;
}
@@ -350,8 +364,11 @@ public class SVNRemoteTests extends SVNT
assertEquals(fetched_rev, 1);
assertEquals(contents.toString("UTF-8"),
"This is the file 'lambda'.");
- for (Map.Entry<String, byte[]> e : properties.entrySet())
- assertTrue(e.getKey().startsWith("svn:entry:"));
+ for (Map.Entry<String, byte[]> e : properties.entrySet()) {
+ final String key = e.getKey();
+ assertTrue(key.startsWith("svn:entry:")
+ || key.startsWith("svn:wc:"));
+ }
}
public void testGetDirectory() throws Exception
@@ -372,8 +389,11 @@ public class SVNRemoteTests extends SVNT
assertEquals(dirents.get("E").getPath(), "E");
assertEquals(dirents.get("F").getPath(), "F");
assertEquals(dirents.get("lambda").getPath(), "lambda");
- for (Map.Entry<String, byte[]> e : properties.entrySet())
- assertTrue(e.getKey().startsWith("svn:entry:"));
+ for (Map.Entry<String, byte[]> e : properties.entrySet()) {
+ final String key = e.getKey();
+ assertTrue(key.startsWith("svn:entry:")
+ || key.startsWith("svn:wc:"));
+ }
}
private final class CommitContext implements CommitCallback
@@ -573,19 +593,19 @@ public class SVNRemoteTests extends SVNT
assertTrue(Arrays.equals(eolstyle, propval));
}
- public void testEditorSetFileProps() throws Exception
+ public void testEditorSetFileContents() throws Exception
{
Charset UTF8 = Charset.forName("UTF-8");
ISVNRemote session = getSession();
- byte[] eolstyle = "CRLF".getBytes(UTF8);
- HashMap<String, byte[]> props = new HashMap<String, byte[]>();
- props.put("svn:eol-style", eolstyle);
+ byte[] contents = "This is modified file 'alpha'.".getBytes(UTF8);
+ Checksum hash = new Checksum(SHA1(contents), Checksum.Kind.SHA1);
+ ByteArrayInputStream stream = new ByteArrayInputStream(contents);
CommitContext cc =
- new CommitContext(session, "Change eol-style on A/B/E/alpha");
+ new CommitContext(session, "Change contents of A/B/E/alpha");
try {
- cc.editor.alterFile("A/B/E/alpha", 1, null, null, props);
+ cc.editor.alterFile("A/B/E/alpha", 1, hash, stream, null);
cc.editor.complete();
} finally {
cc.editor.dispose();
@@ -593,12 +613,10 @@ public class SVNRemoteTests extends SVNT
assertEquals(2, cc.getRevision());
assertEquals(2, session.getLatestRevision());
- byte[] propval = client.propertyGet(session.getSessionUrl()
- + "/A/B/E/alpha",
- "svn:eol-style",
- Revision.HEAD,
- Revision.HEAD);
- assertTrue(Arrays.equals(eolstyle, propval));
+ ByteArrayOutputStream checkcontents = new ByteArrayOutputStream();
+ client.streamFileContent(session.getSessionUrl() + "/A/B/E/alpha",
+ Revision.HEAD, Revision.HEAD, checkcontents);
+ assertTrue(Arrays.equals(contents, checkcontents.toByteArray()));
}
// public void testEditorRotate() throws Exception
@@ -786,13 +804,14 @@ public class SVNRemoteTests extends SVNT
private static class RemoteStatusReceiver implements RemoteStatus
{
- static class StatInfo
+ static class StatInfo implements Comparable<StatInfo>
{
public String relpath = null;
public char kind = ' '; // F, D, L
public boolean textChanged = false;
public boolean propsChanged = false;
public boolean deleted = false;
+ public Entry info = null;
StatInfo(String relpath, char kind, boolean added)
{
@@ -802,55 +821,118 @@ public class SVNRemoteTests extends SVNT
}
StatInfo(String relpath, char kind,
- boolean textChanged, boolean propsChanged)
+ boolean textChanged, boolean propsChanged,
+ Entry info)
{
this.relpath = relpath;
this.kind = kind;
this.textChanged = textChanged;
this.propsChanged = propsChanged;
+ this.info = info;
}
+
+ @Override
+ public boolean equals(Object statinfo)
+ {
+ final StatInfo that = (StatInfo)statinfo;
+ return this.relpath.equals(that.relpath);
+ }
+
+ public int compareTo(StatInfo that)
+ {
+ return this.relpath.compareTo(that.relpath);
+ }
+ }
+
+ private boolean debug;
+
+ public RemoteStatusReceiver()
+ {
+ this.debug = false;
+ }
+
+ public RemoteStatusReceiver(boolean debug)
+ {
+ this.debug = debug;
}
public ArrayList<StatInfo> status = new ArrayList<StatInfo>();
public void addedDirectory(String relativePath)
{
+ if (debug)
+ System.err.println("RemoteStatus: A (dir) " +
+ relativePath);
status.add(new StatInfo(relativePath, 'D', true));
}
public void addedFile(String relativePath)
{
+ if (debug)
+ System.err.println("RemoteStatus: A (file) "
+ + relativePath);
status.add(new StatInfo(relativePath, 'F', true));
}
public void addedSymlink(String relativePath)
{
+ if (debug)
+ System.err.println("RemoteStatus: A (link) "
+ + relativePath);
status.add(new StatInfo(relativePath, 'L', true));
}
public void modifiedDirectory(String relativePath,
- boolean childrenModified, boolean propsModified)
+ boolean childrenModified,
+ boolean propsModified,
+ Entry nodeInfo)
{
+ if (debug)
+ System.err.println("RemoteStatus: " +
+ (childrenModified ? 'M' : '_') +
+ (propsModified ? 'M' : '_') +
+ " (dir) " + relativePath);
status.add(new StatInfo(relativePath, 'D',
- childrenModified, propsModified));
+ childrenModified, propsModified,
+ nodeInfo));
}
public void modifiedFile(String relativePath,
- boolean textModified, boolean propsModified)
+ boolean textModified,
+ boolean propsModified,
+ Entry nodeInfo)
{
+ if (debug)
+ System.err.println("RemoteStatus: " +
+ (textModified ? 'M' : '_') +
+ (propsModified ? 'M' : '_') +
+ " (file) " + relativePath);
status.add(new StatInfo(relativePath, 'F',
- textModified, propsModified));
+ textModified, propsModified,
+ nodeInfo));
}
public void modifiedSymlink(String relativePath,
- boolean targetModified, boolean propsModified)
+ boolean targetModified,
+ boolean propsModified,
+ Entry nodeInfo)
{
+ if (debug)
+ System.err.println("RemoteStatus: " +
+ (targetModified ? 'M' : '_') +
+ (propsModified ? 'M' : '_') +
+ " (link) " + relativePath);
status.add(new StatInfo(relativePath, 'L',
- targetModified, propsModified));
+ targetModified, propsModified,
+ nodeInfo));
+
}
public void deleted(String relativePath)
{
+ if (debug)
+ System.err.println("RemoteStatus: D "
+ + relativePath);
status.add(new StatInfo(relativePath, ' ', false));
}
}
@@ -893,11 +975,112 @@ public class SVNRemoteTests extends SVNT
} finally {
rp.dispose();
}
+
assertEquals(4, receiver.status.size());
+
+ // ra_serf returns the entries in inverted order compared to ra_local.
+ Collections.sort(receiver.status);
RemoteStatusReceiver.StatInfo mod = receiver.status.get(3);
assertEquals("A/D/gamma", mod.relpath);
assertEquals('F', mod.kind);
assertEquals(false, mod.textChanged);
assertEquals(true, mod.propsChanged);
+ assertEquals(false, mod.deleted);
+ assertEquals(2, mod.info.getCommittedRevision());
+ }
+
+ public void testDeletedStatus() throws Exception
+ {
+ ISVNRemote session = getSession();
+
+ CommitMessageCallback cmcb = new CommitMessageCallback() {
+ public String getLogMessage(Set<CommitItem> x) {
+ return "Delete A/mu";
+ }
+ };
+ HashSet<String> paths = new HashSet<String>(1);
+ paths.add(getTestRepoUrl() + "/A/mu");
+ client.remove(paths, false, false, null, cmcb, null);
+
+ RemoteStatusReceiver receiver = new RemoteStatusReceiver();
+ ISVNReporter rp = session.status(null, Revision.SVN_INVALID_REVNUM,
+ Depth.infinity, receiver);
+ try {
+ rp.setPath("", 1, Depth.infinity, false, null);
+ assertEquals(2, rp.finishReport());
+ } finally {
+ rp.dispose();
+ }
+ assertEquals(3, receiver.status.size());
+
+ // ra_serf returns the entries in inverted order compared to ra_local.
+ Collections.sort(receiver.status);
+ RemoteStatusReceiver.StatInfo mod = receiver.status.get(2);
+ assertEquals("A/mu", mod.relpath);
+ assertEquals(' ', mod.kind);
+ assertEquals(false, mod.textChanged);
+ assertEquals(false, mod.propsChanged);
+ assertEquals(true, mod.deleted);
+ }
+
+ public void testTrivialMergeinfo() throws Exception
+ {
+ ISVNRemote session = getSession();
+ ArrayList<String> paths = new ArrayList<String>(1);
+ paths.add("");
+
+ Map<String, Mergeinfo> catalog =
+ session.getMergeinfo(paths, 1L, Mergeinfo.Inheritance.explicit,
+ false);
+ assertEquals(null, catalog);
+ }
+
+ public void testBranchMergeinfo() throws Exception
+ {
+ CommitMessageCallback cmcb = new CommitMessageCallback() {
+ public String getLogMessage(Set<CommitItem> x) {
+ return "testBranchMergeinfo";
+ }
+ };
+
+ ISVNRemote session = getSession();
+
+ // Create a branch
+ ArrayList<CopySource> dirA = new ArrayList<CopySource>(1);
+ dirA.add(new CopySource(getTestRepoUrl() + "/A",
+ Revision.HEAD, Revision.HEAD));
+ client.copy(dirA, getTestRepoUrl() + "/Abranch",
+ false, false, true, null, cmcb, null);
+
+ // Check mergeinfo on new branch
+ ArrayList<String> paths = new ArrayList<String>(1);
+ paths.add("Abranch");
+ Map<String, Mergeinfo> catalog =
+ session.getMergeinfo(paths, 2L, Mergeinfo.Inheritance.explicit,
+ false);
+ assertEquals(null, catalog);
+
+ // Modify source and merge to branch
+ client.propertySetRemote(getTestRepoUrl() + "/A/D/gamma",
+ 2L, "foo", "bar".getBytes(), cmcb,
+ false, null, null);
+ client.update(thisTest.getWCPathSet(), Revision.HEAD, Depth.infinity,
+ false, false, true, false);
+ client.merge(getTestRepoUrl() + "/A", Revision.HEAD, null,
+ thisTest.getWCPath() + "/Abranch", false, Depth.infinity,
+ false, false, false, false);
+ client.commit(thisTest.getWCPathSet(), Depth.infinity, false, false,
+ null, null, cmcb, null);
+
+ // Check inherited mergeinfo on updated branch
+ paths.set(0, "Abranch/mu");
+ catalog = session.getMergeinfo(paths, 4L,
+ Mergeinfo.Inheritance.nearest_ancestor,
+ false);
+ assertEquals(1, catalog.size());
+ List<RevisionRange> ranges =
+ catalog.get("Abranch/mu").getRevisions("/A/mu");
+ assertEquals(1, ranges.size());
+ assertEquals("1-3", ranges.get(0).toString());
}
}
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNTests.java Thu Jul 25 15:29:49 2013
@@ -324,12 +324,12 @@ class SVNTests extends TestCase
public boolean prompt(String realm, String username)
{
- return false;
+ return true;
}
public boolean prompt(String realm, String username, boolean maySave)
{
- return false;
+ return true;
}
public String askQuestion(String realm, String question,
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/INSTALL?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/INSTALL (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/INSTALL Thu Jul 25 15:29:49 2013
@@ -232,35 +232,15 @@ BUILDING SWIG BINDINGS FOR SVN ON WINDOW
compile in Release mode. (This is due to pyconfig.h using the
_DEBUG flag too and setting a #pragma comment(lib) value.)
- For Perl support, you also need to add the paths into Visual Studio.
-
- In Visual C++ 6, go to Tools -> Options -> Directories.
-
- In Visual C++ .NET, go to Tools -> Options -> Projects
- -> VC++ Directories.
-
- Add the following paths:
-
- Executable Directories:
-
- For Perl, path to perl.exe
- (for example, C:\Program Files\Perl\bin)
-
- Library Directories:
-
- For Perl, path to perl##.lib
- (for example, C:\Program Files\Perl\lib\CORE)
-
- Include Directories:
-
- For Perl, path to perl.h
- (for example, C:\Program Files\Perl\lib\CORE)
+ Our project generator detects Perl, Ruby and Python installs and will
+ generate the swig projects for these languages if both swig and the
+ language is found.
3. Create the Visual Studio project files via gen-make.py, adding in
the --with-swig parameter to the installed location for SWIG.
Example:
- > gen-make.py -t vcproj --with-swig="C:\Program Files\SWIG-2.0.2"
+ > gen-make.py <other options> --with-swig="C:\Program Files\SWIG-2.0.2"
4. If you haven't already built Subversion, you should do so now.
Instructions are in the main INSTALL file.
@@ -271,6 +251,7 @@ BUILDING SWIG BINDINGS FOR SVN ON WINDOW
__SWIG_PYTHON__
__SWIG_PERL__
+ __SWIG_RUBY__
6. Install the bindings. The procedure varies depending on the language.
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/core.i
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/core.i?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/core.i (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/core.i Thu Jul 25 15:29:49 2013
@@ -514,7 +514,8 @@
else if ($input == Py_None) {
$1 = NULL;
}
- else if (svn_swig_ConvertPtr($input, (void **)&$1, $descriptor(svn_auth_ssl_server_cert_info_t *)) == 0) {
+ else if (svn_swig_py_convert_ptr($input, (void **)&$1,
+ $descriptor(svn_auth_ssl_server_cert_info_t *)) == 0) {
}
else {
PyErr_SetString(PyExc_TypeError, "not a known type");
@@ -644,28 +645,20 @@ typedef int apr_status_t;
#ifdef SWIGPERL
apr_pool_t *current_pool;
-#if SWIG_VERSION <= 0x010324
-%{
-#define SVN_SWIGEXPORT(t) SWIGEXPORT(t)
-%}
-#else
-%{
-#define SVN_SWIGEXPORT(t) SWIGEXPORT t
-%}
-#endif
-
%{
+/* ### Eventually this should go away. This is not thread safe and a very
+ ### good example on HOW NOT TO USE pools */
static apr_pool_t *current_pool = 0;
-SVN_SWIGEXPORT(apr_pool_t *)
-svn_swig_pl_get_current_pool (void)
+static apr_pool_t *
+core_get_current_pool (void)
{
return current_pool;
}
-SVN_SWIGEXPORT(void)
-svn_swig_pl_set_current_pool (apr_pool_t *pool)
+static void
+core_set_current_pool (apr_pool_t *pool)
{
current_pool = pool;
}
@@ -869,10 +862,8 @@ static void svn_auth_set_gnome_keyring_u
#include "svn_private_config.h"
%}
%init %{
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
- svn_swig_pl_bind_current_pool_fns (&svn_swig_pl_get_current_pool,
- &svn_swig_pl_set_current_pool);
-#endif
+ svn_swig_pl__bind_current_pool_fns(&core_get_current_pool,
+ &core_set_current_pool);
%}
#endif
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/include/svn_types.swg
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/include/svn_types.swg?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/include/svn_types.swg (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/include/svn_types.swg Thu Jul 25 15:29:49 2013
@@ -71,8 +71,8 @@
#ifdef SWIGPYTHON
%typemap(argout) SWIGTYPE **OUTPARAM {
- %append_output(svn_swig_NewPointerObj(*$1, $*1_descriptor,
- _global_py_pool, args));
+ %append_output(svn_swig_py_new_pointer_obj(*$1, $*1_descriptor,
+ _global_py_pool, args));
}
#else
%typemap(argout) SWIGTYPE **OUTPARAM {
@@ -508,15 +508,15 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
%typemap(in) POINTER_TYPES
{
- $1 = ($1_ltype)svn_swig_MustGetPtr($input, $descriptor, $svn_argnum);
+ $1 = ($1_ltype)svn_swig_py_must_get_ptr($input, $descriptor, $svn_argnum);
if (PyErr_Occurred()) {
SWIG_fail;
}
}
%typemap(out) POINTER_TYPES
- "$result = svn_swig_NewPointerObj((void*)($1), $descriptor,
- _global_py_pool, args);";
+ "$result = svn_swig_py_new_pointer_obj((void*)($1), $descriptor,
+ _global_py_pool, args);";
%apply POINTER_TYPES { void *, SWIGTYPE *, SWIGTYPE [] };
@@ -635,8 +635,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
*/
%typemap(argout) CALLABLE_CALLBACK * {
- %append_output(svn_swig_NewPointerObj($1, $descriptor,
- _global_py_pool, args));
+ %append_output(svn_swig_py_new_pointer_obj($1, $descriptor,
+ _global_py_pool, args));
}
/* Convert the pointer to a function pointer back into a regular
@@ -645,7 +645,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
%typemap(in) CALLABLE_CALLBACK {
$<ype tmp =
- svn_swig_MustGetPtr($input, $&descriptor, $svn_argnum);
+ svn_swig_py_must_get_ptr($input, $&descriptor, $svn_argnum);
if (tmp == NULL || PyErr_Occurred()) {
SWIG_fail;
}
@@ -675,8 +675,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
SWIG_fail;
}
*tmp = ($ltype) $1;
- $result = svn_swig_NewPointerObj(tmp, $&1_descriptor,
- py_pool, args);
+ $result = svn_swig_py_new_pointer_obj(tmp, $&1_descriptor,
+ py_pool, args);
}
}
@@ -694,7 +694,7 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
*tmp = ($ltype) $value;
%set_constant("$symname",
- svn_swig_NewPointerObj(tmp, $&descriptor, NULL, NULL)
+ svn_swig_py_new_pointer_obj(tmp, $&descriptor, NULL, NULL)
);
}
@@ -997,8 +997,8 @@ svn_ ## TYPE ## _swig_rb_closed(VALUE se
/* We don't know the type of this reference, so we'll have to
* treat it as an opaque void pointer.
*/
- $result = svn_swig_NewPointerObj($1, $descriptor,
- _global_py_pool, args);
+ $result = svn_swig_py_new_pointer_obj($1, $descriptor,
+ _global_py_pool, args);
}
}
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c Thu Jul 25 15:29:49 2013
@@ -54,7 +54,7 @@ static HV *type_cache = NULL;
#define _SWIG_TYPE(name) _swig_perl_type_query(name, 0)
#define POOLINFO _SWIG_TYPE("apr_pool_t *")
-static swig_type_info *_swig_perl_type_query(const char *typename, U32 klen)
+static swig_type_info *_swig_perl_type_query(const char *type_name, U32 klen)
{
SV **type_info;
swig_type_info *tinfo;
@@ -63,13 +63,13 @@ static swig_type_info *_swig_perl_type_q
type_cache = newHV();
if (klen == 0)
- klen = strlen(typename);
+ klen = strlen(type_name);
- if ((type_info = hv_fetch(type_cache, typename, klen, 0)))
+ if ((type_info = hv_fetch(type_cache, type_name, klen, 0)))
return (swig_type_info *) (SvIV(*type_info));
- tinfo = SWIG_TypeQuery(typename);
- hv_store(type_cache, typename, klen, newSViv((IV)tinfo), 0);
+ tinfo = SWIG_TypeQuery(type_name);
+ hv_store(type_cache, type_name, klen, newSViv((IV)tinfo), 0);
return tinfo;
}
@@ -178,16 +178,16 @@ static apr_hash_t *svn_swig_pl_to_hash(S
I32 cnt, retlen;
if (!(source && SvROK(source) && SvTYPE(SvRV(source)) == SVt_PVHV)) {
- return NULL;
+ return NULL;
}
hash = apr_hash_make(pool);
h = (HV *)SvRV(source);
cnt = hv_iterinit(h);
while (cnt--) {
- SV* item = hv_iternextsv(h, &key, &retlen);
- void *val = cv(item, ctx, pool);
- svn_hash_sets(hash, key, val);
+ SV* item = hv_iternextsv(h, &key, &retlen);
+ void *val = cv(item, ctx, pool);
+ svn_hash_sets(hash, key, val);
}
return hash;
@@ -269,8 +269,8 @@ apr_array_header_t *svn_swig_pl_strings_
}
apr_array_header_t *svn_swig_pl_objs_to_array(SV *source,
- swig_type_info *tinfo,
- apr_pool_t *pool)
+ swig_type_info *tinfo,
+ apr_pool_t *pool)
{
return svn_swig_pl_to_array(source,
(pl_element_converter_t)convert_pl_obj,
@@ -355,17 +355,17 @@ static SV *convert_hash(apr_hash_t *hash
hv = newHV();
for (hi = apr_hash_first(NULL, hash); hi; hi = apr_hash_next(hi)) {
- const char *key;
- void *val;
- int klen;
- SV *obj;
-
- apr_hash_this(hi, (void *)&key, NULL, &val);
- klen = strlen(key);
-
- obj = converter_func(val, ctx);
- hv_store(hv, (const char *)key, klen, obj, 0);
- SvREFCNT_inc(obj);
+ const char *key;
+ void *val;
+ int klen;
+ SV *obj;
+
+ apr_hash_this(hi, (void *)&key, NULL, &val);
+ klen = strlen(key);
+
+ obj = converter_func(val, ctx);
+ hv_store(hv, (const char *)key, klen, obj, 0);
+ SvREFCNT_inc(obj);
}
return sv_2mortal(newRV_noinc((SV*)hv));
@@ -385,16 +385,16 @@ SV *svn_swig_pl_convert_hash(apr_hash_t
/* c -> perl array convertors */
static SV *convert_array(const apr_array_header_t *array,
- element_converter_t converter_func, void *ctx)
+ element_converter_t converter_func, void *ctx)
{
AV *list = newAV();
int i;
for (i = 0; i < array->nelts; ++i) {
- void *element = APR_ARRAY_IDX(array, i, void *);
- SV *item = converter_func(element, ctx);
- av_push(list, item);
- SvREFCNT_inc(item);
+ void *element = APR_ARRAY_IDX(array, i, void *);
+ SV *item = converter_func(element, ctx);
+ av_push(list, item);
+ SvREFCNT_inc(item);
}
return sv_2mortal(newRV_noinc((SV*)list));
}
@@ -532,85 +532,85 @@ svn_error_t *svn_swig_pl_callback_thunk(
va_start(ap, fmt);
while (*fp) {
- char *c;
- void *o;
- SV *obj;
- swig_type_info *t;
- svn_string_t *str;
+ char *c;
+ void *o;
+ SV *obj;
+ swig_type_info *t;
+ svn_string_t *str;
- switch (*fp++) {
- case 'O':
+ switch (*fp++) {
+ case 'O':
XPUSHs(va_arg(ap, SV *));
- break;
- case 'S': /* swig object */
+ break;
+ case 'S': /* swig object */
o = va_arg(ap, void *);
t = va_arg(ap, swig_type_info *);
obj = sv_newmortal();
SWIG_MakePtr(obj, o, t, 0);
- XPUSHs(obj);
- break;
+ XPUSHs(obj);
+ break;
- case 's': /* string */
+ case 's': /* string */
c = va_arg(ap, char *);
- XPUSHs(c ? sv_2mortal(newSVpv(c, 0)) : &PL_sv_undef);
- break;
+ XPUSHs(c ? sv_2mortal(newSVpv(c, 0)) : &PL_sv_undef);
+ break;
- case 'i': /* apr_int32_t */
- XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_int32_t))));
- break;
+ case 'i': /* apr_int32_t */
+ XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_int32_t))));
+ break;
- case 'u': /* apr_uint32_t */
+ case 'u': /* apr_uint32_t */
XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_uint32_t))));
- break;
+ break;
- case 'r': /* svn_revnum_t */
- XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_revnum_t))));
- break;
-
- case 'b': /* svn_boolean_t */
- XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_boolean_t))));
- break;
-
- case 't': /* svn_string_t */
- str = va_arg(ap, svn_string_t *);
- XPUSHs(str ? sv_2mortal(newSVpv(str->data, str->len))
- : &PL_sv_undef);
- break;
-
- case 'L': /* apr_int64_t */
- /* Pass into perl as a string because some implementations may
- * not be able to handle a 64-bit int. If it's too long to
- * fit in Perl's interal IV size then perl will only make
- * it available as a string. If not then perl will convert
- * it to an IV for us. So this handles the problem gracefully */
- c = malloc(30);
- snprintf(c,30,"%" APR_INT64_T_FMT,va_arg(ap, apr_int64_t));
- XPUSHs(sv_2mortal(newSVpv(c, 0)));
- free(c);
- break;
-
- case 'U': /* apr_uint64_t */
- c = malloc(30);
- snprintf(c,30,"%" APR_UINT64_T_FMT,va_arg(ap, apr_uint64_t));
- XPUSHs(sv_2mortal(newSVpv(c, 0)));
- free(c);
- break;
-
- case 'z': /* apr_size_t */
- if (sizeof(apr_size_t) >= 8)
- {
- c = malloc(30);
- snprintf(c,30,"%" APR_SIZE_T_FMT,va_arg(ap, apr_size_t));
- XPUSHs(sv_2mortal(newSVpv(c, 0)));
- free(c);
- }
- else
- {
- XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_size_t))));
- }
- break;
- }
+ case 'r': /* svn_revnum_t */
+ XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_revnum_t))));
+ break;
+
+ case 'b': /* svn_boolean_t */
+ XPUSHs(sv_2mortal(newSViv(va_arg(ap, svn_boolean_t))));
+ break;
+
+ case 't': /* svn_string_t */
+ str = va_arg(ap, svn_string_t *);
+ XPUSHs(str ? sv_2mortal(newSVpv(str->data, str->len))
+ : &PL_sv_undef);
+ break;
+
+ case 'L': /* apr_int64_t */
+ /* Pass into perl as a string because some implementations may
+ * not be able to handle a 64-bit int. If it's too long to
+ * fit in Perl's interal IV size then perl will only make
+ * it available as a string. If not then perl will convert
+ * it to an IV for us. So this handles the problem gracefully */
+ c = malloc(30);
+ snprintf(c,30,"%" APR_INT64_T_FMT,va_arg(ap, apr_int64_t));
+ XPUSHs(sv_2mortal(newSVpv(c, 0)));
+ free(c);
+ break;
+
+ case 'U': /* apr_uint64_t */
+ c = malloc(30);
+ snprintf(c,30,"%" APR_UINT64_T_FMT,va_arg(ap, apr_uint64_t));
+ XPUSHs(sv_2mortal(newSVpv(c, 0)));
+ free(c);
+ break;
+
+ case 'z': /* apr_size_t */
+ if (sizeof(apr_size_t) >= 8)
+ {
+ c = malloc(30);
+ snprintf(c,30,"%" APR_SIZE_T_FMT,va_arg(ap, apr_size_t));
+ XPUSHs(sv_2mortal(newSVpv(c, 0)));
+ free(c);
+ }
+ else
+ {
+ XPUSHs(sv_2mortal(newSViv(va_arg(ap, apr_size_t))));
+ }
+ break;
+ }
}
va_end(ap);
@@ -619,23 +619,23 @@ svn_error_t *svn_swig_pl_callback_thunk(
switch (caller_func) {
case CALL_SV:
count = call_sv(func, call_flags );
- break;
+ break;
case CALL_METHOD:
count = call_method(func, call_flags );
- break;
+ break;
default:
croak("unkonwn calling type");
- break;
+ break;
}
SPAGAIN ;
if (((call_flags & G_SCALAR) && count != 1) ||
- ((call_flags & G_VOID) && count != 0))
+ ((call_flags & G_VOID) && count != 0))
croak("Wrong number of returns");
if (result) {
- *result = POPs;
- SvREFCNT_inc(*result);
+ *result = POPs;
+ SvREFCNT_inc(*result);
}
PUTBACK;
@@ -788,8 +788,8 @@ static svn_error_t * thunk_close_directo
}
static svn_error_t * thunk_absent_directory(const char *path,
- void *parent_baton,
- apr_pool_t *pool)
+ void *parent_baton,
+ apr_pool_t *pool)
{
item_baton *ib = parent_baton;
@@ -851,8 +851,8 @@ static svn_error_t * thunk_window_handle
SvREFCNT_dec(handler);
}
else {
- swig_type_info *tinfo = _SWIG_TYPE("svn_txdelta_window_t *");
- SVN_ERR(svn_swig_pl_callback_thunk(CALL_SV, handler,
+ swig_type_info *tinfo = _SWIG_TYPE("svn_txdelta_window_t *");
+ SVN_ERR(svn_swig_pl_callback_thunk(CALL_SV, handler,
NULL, "S", window, tinfo));
}
@@ -874,30 +874,30 @@ thunk_apply_textdelta(void *file_baton,
"OOsS", ib->editor, ib->baton,
base_checksum, pool, POOLINFO));
if (SvOK(result)) {
- if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
- swig_type_info *handler_info =
+ if (SvROK(result) && SvTYPE(SvRV(result)) == SVt_PVAV) {
+ swig_type_info *handler_info =
_SWIG_TYPE("svn_txdelta_window_handler_t");
swig_type_info *void_info = _SWIG_TYPE("void *");
- AV *array = (AV *)SvRV(result);
+ AV *array = (AV *)SvRV(result);
- if (SWIG_ConvertPtr(*av_fetch(array, 0, 0),
- (void **)handler, handler_info,0) < 0) {
- croak("Unable to convert from SWIG Type");
- }
- if (SWIG_ConvertPtr(*av_fetch(array, 1, 0),
- h_baton, void_info,0) < 0) {
- croak("Unable to convert from SWIG Type ");
- }
+ if (SWIG_ConvertPtr(*av_fetch(array, 0, 0),
+ (void **)handler, handler_info,0) < 0) {
+ croak("Unable to convert from SWIG Type");
+ }
+ if (SWIG_ConvertPtr(*av_fetch(array, 1, 0),
+ h_baton, void_info,0) < 0) {
+ croak("Unable to convert from SWIG Type ");
+ }
SvREFCNT_dec(result);
- }
- else {
- *handler = thunk_window_handler;
- *h_baton = result;
- }
+ }
+ else {
+ *handler = thunk_window_handler;
+ *h_baton = result;
+ }
}
else {
- *handler = svn_delta_noop_window_handler;
- *h_baton = NULL;
+ *handler = svn_delta_noop_window_handler;
+ *h_baton = NULL;
}
return SVN_NO_ERROR;
@@ -935,8 +935,8 @@ static svn_error_t * thunk_close_file(vo
}
static svn_error_t * thunk_absent_file(const char *path,
- void *parent_baton,
- apr_pool_t *pool)
+ void *parent_baton,
+ apr_pool_t *pool)
{
item_baton *ib = parent_baton;
@@ -962,10 +962,10 @@ static svn_error_t * thunk_abort_edit(vo
void
-svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
- void **h_baton,
- SV *callback,
- apr_pool_t *pool)
+svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+ void **h_baton,
+ SV *callback,
+ apr_pool_t *pool)
{
*handler = thunk_window_handler;
*h_baton = callback;
@@ -973,10 +973,10 @@ svn_delta_wrap_window_handler(svn_txdelt
svn_swig_pl_hold_ref_in_pool(pool, callback);
}
-void svn_delta_make_editor(svn_delta_editor_t **editor,
- void **edit_baton,
- SV *perl_editor,
- apr_pool_t *pool)
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+ void **edit_baton,
+ SV *perl_editor,
+ apr_pool_t *pool)
{
svn_delta_editor_t *thunk_editor = svn_delta_default_editor(pool);
@@ -1003,18 +1003,18 @@ void svn_delta_make_editor(svn_delta_edi
}
svn_error_t *svn_swig_pl_thunk_log_receiver(void *baton,
- apr_hash_t *changed_paths,
- svn_revnum_t rev,
- const char *author,
- const char *date,
- const char *msg,
- apr_pool_t *pool)
+ apr_hash_t *changed_paths,
+ svn_revnum_t rev,
+ const char *author,
+ const char *date,
+ const char *msg,
+ apr_pool_t *pool)
{
SV *receiver = baton;
swig_type_info *tinfo = _SWIG_TYPE("svn_log_changed_path_t *");
if (!SvOK(receiver))
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
svn_swig_pl_callback_thunk(CALL_SV,
receiver, NULL,
@@ -1033,7 +1033,7 @@ svn_error_t *svn_swig_pl_thunk_log_entry
SV *receiver = baton;
if (!SvOK(receiver))
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
svn_swig_pl_callback_thunk(CALL_SV,
receiver, NULL,
@@ -1071,7 +1071,7 @@ svn_error_t *svn_swig_pl_thunk_history_f
SV *func = baton;
if (!SvOK(func))
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
svn_swig_pl_callback_thunk(CALL_SV,
func, NULL,
@@ -1089,7 +1089,7 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
SV *func = baton, *result;
if (!SvOK(func))
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
svn_swig_pl_callback_thunk(CALL_SV,
func, &result,
@@ -1103,12 +1103,12 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
}
svn_error_t *svn_swig_pl_thunk_commit_callback(svn_revnum_t new_revision,
- const char *date,
- const char *author,
- void *baton)
+ const char *date,
+ const char *author,
+ void *baton)
{
if (!SvOK((SV *)baton))
- return SVN_NO_ERROR;
+ return SVN_NO_ERROR;
svn_swig_pl_callback_thunk(CALL_SV, baton, NULL,
"rss", new_revision, date, author);
@@ -1135,8 +1135,8 @@ svn_error_t *svn_swig_pl_thunk_commit_ca
/* Wrap RA */
static svn_error_t * thunk_open_tmp_file(apr_file_t **fp,
- void *callback_baton,
- apr_pool_t *pool)
+ void *callback_baton,
+ apr_pool_t *pool)
{
SV *result;
swig_type_info *tinfo = _SWIG_TYPE("apr_file_t *");
@@ -1145,7 +1145,7 @@ static svn_error_t * thunk_open_tmp_file
&result, "OS", callback_baton, pool, POOLINFO);
if (SWIG_ConvertPtr(result, (void *)fp, tinfo,0) < 0) {
- croak("Unable to convert from SWIG Type");
+ croak("Unable to convert from SWIG Type");
}
SvREFCNT_dec(result);
@@ -1168,15 +1168,15 @@ svn_error_t *thunk_get_wc_prop(void *bat
/* this is svn_string_t * typemap in */
if (!SvOK(result) || result == &PL_sv_undef) {
- *value = NULL;
+ *value = NULL;
}
else if (SvPOK(result)) {
data = SvPV(result, len);
*value = svn_string_ncreate(data, len, pool);
}
else {
- SvREFCNT_dec(result);
- croak("not a string");
+ SvREFCNT_dec(result);
+ croak("not a string");
}
SvREFCNT_dec(result);
@@ -1184,10 +1184,10 @@ svn_error_t *thunk_get_wc_prop(void *bat
}
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
- void **c_baton,
- SV *perl_callbacks,
- apr_pool_t *pool)
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+ void **c_baton,
+ SV *perl_callbacks,
+ apr_pool_t *pool)
{
SV *auth_baton;
@@ -1202,7 +1202,7 @@ svn_error_t *svn_ra_make_callbacks(svn_r
if (SWIG_ConvertPtr(auth_baton,
(void **)&(*cb)->auth_baton, _SWIG_TYPE("svn_auth_baton_t *"),0) < 0) {
- croak("Unable to convert from SWIG Type");
+ croak("Unable to convert from SWIG Type");
}
*c_baton = perl_callbacks;
svn_swig_pl_hold_ref_in_pool(pool, perl_callbacks);
@@ -1356,13 +1356,13 @@ svn_error_t *svn_swig_pl_thunk_ssl_clien
/* Thunked version of svn_wc_notify_func_t callback type */
void svn_swig_pl_notify_func(void * baton,
- const char *path,
- svn_wc_notify_action_t action,
- svn_node_kind_t kind,
- const char *mime_type,
- svn_wc_notify_state_t content_state,
- svn_wc_notify_state_t prop_state,
- svn_revnum_t revision)
+ const char *path,
+ svn_wc_notify_action_t action,
+ svn_node_kind_t kind,
+ const char *mime_type,
+ svn_wc_notify_state_t content_state,
+ svn_wc_notify_state_t prop_state,
+ svn_revnum_t revision)
{
if (!SvOK((SV *)baton)) {
return;
@@ -1391,7 +1391,7 @@ svn_error_t *svn_swig_pl_get_commit_log_
if (!SvOK((SV *)baton)) {
*log_msg = apr_pstrdup(pool, "");
- *tmp_file = NULL;
+ *tmp_file = NULL;
return SVN_NO_ERROR;
}
@@ -1409,17 +1409,17 @@ svn_error_t *svn_swig_pl_get_commit_log_
/* client returned undef to us */
*log_msg = NULL;
} else if (SvPOK(SvRV(log_msg_sv))) {
- /* client returned string so get the string and then duplicate
- * it using pool memory */
+ /* client returned string so get the string and then duplicate
+ * it using pool memory */
*log_msg = apr_pstrdup(pool, SvPV_nolen(SvRV(log_msg_sv)));
} else {
croak("Invalid value in log_msg reference, must be undef or a string");
}
if (!SvOK(SvRV(tmp_file_sv))) {
- *tmp_file = NULL;
+ *tmp_file = NULL;
} else if (SvPOK(SvRV(tmp_file_sv))) {
- *tmp_file = apr_pstrdup(pool, SvPV_nolen(SvRV(tmp_file_sv)));
+ *tmp_file = apr_pstrdup(pool, SvPV_nolen(SvRV(tmp_file_sv)));
} else {
croak("Invalid value in tmp_file reference, "
"must be undef or a string");
@@ -1427,9 +1427,9 @@ svn_error_t *svn_swig_pl_get_commit_log_
if (sv_derived_from(result, "_p_svn_error_t")) {
swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
- if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+ if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
SvREFCNT_dec(result);
- croak("Unable to convert from SWIG Type");
+ croak("Unable to convert from SWIG Type");
}
}
@@ -1480,10 +1480,10 @@ svn_error_t *svn_swig_pl_cancel_func(voi
if (sv_derived_from(result,"_p_svn_error_t")) {
swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
- if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
- SvREFCNT_dec(result);
- croak("Unable to convert from SWIG Type");
- }
+ if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+ SvREFCNT_dec(result);
+ croak("Unable to convert from SWIG Type");
+ }
} else if (SvIOK(result) && SvIV(result)) {
ret_val = svn_error_create(SVN_ERR_CANCELLED, NULL,
"By cancel callback");
@@ -1579,9 +1579,9 @@ svn_error_t *svn_swig_pl_blame_func(void
if (sv_derived_from(result, "_p_svn_error_t")) {
swig_type_info *errorinfo = _SWIG_TYPE("svn_error_t *");
- if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
+ if (SWIG_ConvertPtr(result, (void *)&ret_val, errorinfo, 0) < 0) {
SvREFCNT_dec(result);
- croak("Unable to convert from SWIG Type");
+ croak("Unable to convert from SWIG Type");
}
}
@@ -1594,7 +1594,7 @@ svn_boolean_t svn_swig_pl_thunk_config_e
{
SV *result;
if (!SvOK((SV *)baton))
- return 0;
+ return 0;
svn_swig_pl_callback_thunk(CALL_SV, baton, &result,
"ss", name, value);
@@ -1605,21 +1605,33 @@ svn_boolean_t svn_swig_pl_thunk_config_e
/* default pool support */
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
-static svn_swig_pl_get_current_pool_t svn_swig_pl_get_current_pool = NULL;
-static svn_swig_pl_set_current_pool_t svn_swig_pl_set_current_pool = NULL;
+static svn_swig_pl_get_current_pool_func_t get_current_pool_cb = NULL;
+static svn_swig_pl_set_current_pool_func_t set_current_pool_cb = NULL;
-void svn_swig_pl_bind_current_pool_fns(svn_swig_pl_get_current_pool_t get,
- svn_swig_pl_set_current_pool_t set)
+void
+svn_swig_pl__bind_current_pool_fns(svn_swig_pl_get_current_pool_func_t get,
+ svn_swig_pl_set_current_pool_func_t set)
{
- svn_swig_pl_get_current_pool = get;
- svn_swig_pl_set_current_pool = set;
+ /* This function should only be called ONCE, otherwise there are two
+ global variables CURRENT_POOL */
+ SVN_ERR_ASSERT_NO_RETURN(get_current_pool_cb == NULL
+ && set_current_pool_cb == NULL);
+
+ get_current_pool_cb = get;
+ set_current_pool_cb = set;
}
-#else
-apr_pool_t *svn_swig_pl_get_current_pool(void);
-void svn_swig_pl_set_current_pool(apr_pool_t *pool);
-#endif
+apr_pool_t * svn_swig_pl_get_current_pool()
+{
+ SVN_ERR_ASSERT_NO_RETURN(get_current_pool_cb != NULL);
+ return get_current_pool_cb();
+}
+
+void svn_swig_pl_set_current_pool(apr_pool_t *pool)
+{
+ SVN_ERR_ASSERT_NO_RETURN(set_current_pool_cb != NULL);
+ set_current_pool_cb(pool);
+}
apr_pool_t *svn_swig_pl_make_pool(SV *obj)
{
@@ -1627,12 +1639,12 @@ apr_pool_t *svn_swig_pl_make_pool(SV *ob
if (obj && sv_isobject(obj)) {
if (sv_derived_from(obj, "SVN::Pool")) {
- obj = SvRV(obj);
- }
- if (sv_derived_from(obj, "_p_apr_pool_t")) {
- SWIG_ConvertPtr(obj, (void **)&pool, POOLINFO, 0);
- return pool;
- }
+ obj = SvRV(obj);
+ }
+ if (sv_derived_from(obj, "_p_apr_pool_t")) {
+ SWIG_ConvertPtr(obj, (void **)&pool, POOLINFO, 0);
+ return pool;
+ }
}
if (!svn_swig_pl_get_current_pool())
@@ -1657,15 +1669,15 @@ static svn_error_t *io_handle_read(void
MAGIC *mg;
if ((mg = SvTIED_mg((SV*)io->io, PERL_MAGIC_tiedscalar))) {
- SV *ret;
- SV *buf = sv_newmortal();
+ SV *ret;
+ SV *buf = sv_newmortal();
- svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"READ", &ret, "OOz",
+ svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"READ", &ret, "OOz",
SvTIED_obj((SV*)io->io, mg),
buf, *len);
- *len = SvIV(ret);
- SvREFCNT_dec(ret);
- memmove(buffer, SvPV_nolen(buf), *len);
+ *len = SvIV(ret);
+ SvREFCNT_dec(ret);
+ memmove(buffer, SvPV_nolen(buf), *len);
}
else
*len = PerlIO_read(IoIFP(io->io), buffer, *len);
@@ -1680,12 +1692,12 @@ static svn_error_t *io_handle_write(void
MAGIC *mg;
if ((mg = SvTIED_mg((SV*)io->io, PERL_MAGIC_tiedscalar))) {
- SV *ret, *pv;
+ SV *ret, *pv;
pv = sv_2mortal(newSVpvn(data, *len));
- svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"WRITE", &ret, "OOz",
+ svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"WRITE", &ret, "OOz",
SvTIED_obj((SV*)io->io, mg), pv, *len);
- *len = SvIV(ret);
- SvREFCNT_dec(ret);
+ *len = SvIV(ret);
+ SvREFCNT_dec(ret);
}
else
*len = PerlIO_write(IoIFP(io->io), data, *len);
@@ -1729,7 +1741,7 @@ svn_error_t *svn_swig_pl_make_stream(svn
if (sv_derived_from(obj, "SVN::Stream"))
svn_swig_pl_callback_thunk(CALL_METHOD, (void *)"svn_stream",
&obj, "O", obj);
- else if (!sv_derived_from(obj, "_p_svn_stream_t"))
+ else if (!sv_derived_from(obj, "_p_svn_stream_t"))
simple_type = 0;
if (simple_type) {
@@ -1739,17 +1751,17 @@ svn_error_t *svn_swig_pl_make_stream(svn
}
if (obj && SvROK(obj) && SvTYPE(SvRV(obj)) == SVt_PVGV &&
- (io = GvIO(SvRV(obj)))) {
- apr_pool_t *pool = svn_swig_pl_get_current_pool();
- io_baton_t *iob = apr_palloc(pool, sizeof(io_baton_t));
- SvREFCNT_inc(obj);
- iob->obj = obj;
- iob->io = io;
- *stream = svn_stream_create(iob, pool);
- svn_stream_set_read(*stream, io_handle_read);
- svn_stream_set_write(*stream, io_handle_write);
- svn_stream_set_close(*stream, io_handle_close);
- apr_pool_cleanup_register(pool, iob, io_handle_cleanup,
+ (io = GvIO(SvRV(obj)))) {
+ apr_pool_t *pool = svn_swig_pl_get_current_pool();
+ io_baton_t *iob = apr_palloc(pool, sizeof(io_baton_t));
+ SvREFCNT_inc(obj);
+ iob->obj = obj;
+ iob->io = io;
+ *stream = svn_stream_create(iob, pool);
+ svn_stream_set_read(*stream, io_handle_read);
+ svn_stream_set_write(*stream, io_handle_write);
+ svn_stream_set_close(*stream, io_handle_close);
+ apr_pool_cleanup_register(pool, iob, io_handle_cleanup,
io_handle_cleanup);
}
@@ -1793,7 +1805,7 @@ apr_file_t *svn_swig_pl_make_file(SV *fi
apr_file_t *apr_file = NULL;
if (!SvOK(file) || file == &PL_sv_undef)
- return NULL;
+ return NULL;
if (SvPOKp(file)) {
apr_file_open(&apr_file, SvPV_nolen(file),
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h Thu Jul 25 15:29:49 2013
@@ -59,14 +59,14 @@ extern "C" {
#endif
+typedef apr_pool_t *(*svn_swig_pl_get_current_pool_func_t)(void);
+typedef void (*svn_swig_pl_set_current_pool_func_t)(apr_pool_t *pool);
-#if defined(SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK)
-typedef apr_pool_t *(*svn_swig_pl_get_current_pool_t)(void);
-typedef void (*svn_swig_pl_set_current_pool_t)(apr_pool_t *pool);
+void svn_swig_pl__bind_current_pool_fns(svn_swig_pl_get_current_pool_func_t get,
+ svn_swig_pl_set_current_pool_func_t set);
-void svn_swig_pl_bind_current_pool_fns(svn_swig_pl_get_current_pool_t get,
- svn_swig_pl_set_current_pool_t set);
-#endif
+apr_pool_t * svn_swig_pl_get_current_pool();
+void svn_swig_pl_set_current_pool(apr_pool_t *pool);
apr_pool_t *svn_swig_pl_make_pool(SV *obj);
@@ -83,8 +83,6 @@ svn_error_t *svn_swig_pl_callback_thunk(
SV *svn_swig_pl_prophash_to_hash(apr_hash_t *hash);
SV *svn_swig_pl_convert_hash(apr_hash_t *hash, swig_type_info *tinfo);
-SV *svn_swig_pl_convert_hash_of_revnum_t(apr_hash_t *hash);
-
apr_array_header_t *svn_swig_pl_strings_to_array(SV *source,
apr_pool_t *pool);
@@ -105,9 +103,6 @@ apr_array_header_t *svn_swig_pl_array_to
SV *source, apr_pool_t *pool);
SV *svn_swig_pl_array_to_list(const apr_array_header_t *array);
-/* Formerly used by pre-1.0 APIs. Now unused
-SV *svn_swig_pl_ints_to_list(const apr_array_header_t *array);
-*/
SV *svn_swig_pl_convert_array(const apr_array_header_t *array,
swig_type_info *tinfo);
@@ -162,10 +157,10 @@ svn_error_t *svn_swig_pl_thunk_authz_fun
apr_pool_t *pool);
/* ra callbacks. */
-svn_error_t *svn_ra_make_callbacks(svn_ra_callbacks_t **cb,
- void **c_baton,
- SV *perl_callbacks,
- apr_pool_t *pool);
+svn_error_t *svn_swig_pl_make_callbacks(svn_ra_callbacks_t **cb,
+ void **c_baton,
+ SV *perl_callbacks,
+ apr_pool_t *pool);
/* thunked gnome_keyring_unlock_prompt callback function */
svn_error_t *svn_swig_pl_thunk_gnome_keyring_unlock_prompt(char **keyring_password,
@@ -277,15 +272,15 @@ svn_error_t *svn_swig_pl_blame_func(void
svn_boolean_t svn_swig_pl_thunk_config_enumerator(const char *name, const char *value, void *baton);
/* helper for making the editor */
-void svn_delta_make_editor(svn_delta_editor_t **editor,
- void **edit_baton,
- SV *perl_editor,
- apr_pool_t *pool);
-
-void svn_delta_wrap_window_handler(svn_txdelta_window_handler_t *handler,
- void **h_baton,
- SV *callback,
- apr_pool_t *pool);
+void svn_swig_pl_make_editor(svn_delta_editor_t **editor,
+ void **edit_baton,
+ SV *perl_editor,
+ apr_pool_t *pool);
+
+void svn_swig_pl_wrap_window_handler(svn_txdelta_window_handler_t *handler,
+ void **h_baton,
+ SV *callback,
+ apr_pool_t *pool);
/* svn_stream_t helpers */
svn_error_t *svn_swig_pl_make_stream(svn_stream_t **stream, SV *obj);
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/perl/native/Client.pm
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/perl/native/Client.pm?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/perl/native/Client.pm (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/perl/native/Client.pm Thu Jul 25 15:29:49 2013
@@ -138,7 +138,7 @@ keywords) 'HEAD', 'BASE', 'COMMITTED', a
meanings as in the command line client. When referencing a working copy
you can use the string 'WORKING" to reference the BASE plus any local
modifications. C<undef> may be used to specify an unspecified revision.
-You may alos pass a date by specifying the date inside curly braces
+You may also pass a date by specifying the date inside curly braces
'{}'. The date formats accepted are the same as the command line client
accepts. Finally a C<_p_svn_opt_revision_t> object is accepted
(which may have been returned by some Subversion function).
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c Thu Jul 25 15:29:49 2013
@@ -93,7 +93,7 @@ void svn_swig_py_release_py_lock(void)
if (_saved_thread_key == NULL)
{
/* Obviously, creating a top-level pool for this is pretty stupid. */
- apr_pool_create(&_saved_thread_pool, NULL);
+ _saved_thread_pool = svn_pool_create(NULL);
apr_threadkey_private_create(&_saved_thread_key, NULL,
_saved_thread_pool);
}
@@ -152,7 +152,7 @@ int svn_swig_py_get_pool_arg(PyObject *a
PyObject *input = PyTuple_GET_ITEM(args, argnum);
if (input != Py_None && PyObject_HasAttrString(input, markValid))
{
- *pool = svn_swig_MustGetPtr(input, type, argnum+1);
+ *pool = svn_swig_py_must_get_ptr(input, type, argnum+1);
if (*pool == NULL)
return 1;
*py_pool = input;
@@ -163,7 +163,7 @@ int svn_swig_py_get_pool_arg(PyObject *a
/* We couldn't find a pool argument, so we'll create a subpool */
*pool = svn_pool_create(application_pool);
- *py_pool = svn_swig_NewPointerObj(*pool, type, application_py_pool,
+ *py_pool = svn_swig_py_new_pointer_obj(*pool, type, application_py_pool,
NULL);
if (*py_pool == NULL)
return 1;
@@ -190,7 +190,7 @@ int svn_swig_py_get_parent_pool(PyObject
Py_DECREF(*py_pool);
- *pool = svn_swig_MustGetPtr(*py_pool, type, 1);
+ *pool = svn_swig_py_must_get_ptr(*py_pool, type, 1);
if (*pool == NULL)
return 1;
@@ -245,8 +245,8 @@ static int proxy_set_pool(PyObject **pro
#define svn_swig_TypeQuery(x) SWIG_TypeQuery(x)
/** Wrapper for SWIG_NewPointerObj */
-PyObject *svn_swig_NewPointerObj(void *obj, swig_type_info *type,
- PyObject *pool, PyObject *args)
+PyObject *svn_swig_py_new_pointer_obj(void *obj, swig_type_info *type,
+ PyObject *pool, PyObject *args)
{
PyObject *proxy = SWIG_NewPointerObj(obj, type, 0);
@@ -270,7 +270,7 @@ PyObject *svn_swig_NewPointerObj(void *o
return proxy;
}
-/** svn_swig_NewPointerObj, except a string is used to describe the type */
+/** svn_swig_py_new_pointer_obj, except a string is used to describe the type */
static PyObject *svn_swig_NewPointerObjString(void *ptr, const char *type,
PyObject *py_pool)
{
@@ -282,11 +282,11 @@ static PyObject *svn_swig_NewPointerObjS
}
/* ### cache the swig_type_info at some point? */
- return svn_swig_NewPointerObj(ptr, typeinfo, py_pool, NULL);
+ return svn_swig_py_new_pointer_obj(ptr, typeinfo, py_pool, NULL);
}
/** Wrapper for SWIG_ConvertPtr */
-int svn_swig_ConvertPtr(PyObject *input, void **obj, swig_type_info *type)
+int svn_swig_py_convert_ptr(PyObject *input, void **obj, swig_type_info *type)
{
if (PyObject_HasAttrString(input, assertValid))
{
@@ -310,11 +310,11 @@ int svn_swig_ConvertPtr(PyObject *input,
static int svn_swig_ConvertPtrString(PyObject *input,
void **obj, const char *type)
{
- return svn_swig_ConvertPtr(input, obj, svn_swig_TypeQuery(type));
+ return svn_swig_py_convert_ptr(input, obj, svn_swig_TypeQuery(type));
}
/** Wrapper for SWIG_MustGetPtr */
-void *svn_swig_MustGetPtr(void *input, swig_type_info *type, int argnum)
+void *svn_swig_py_must_get_ptr(void *input, swig_type_info *type, int argnum)
{
if (PyObject_HasAttrString(input, assertValid))
{
@@ -443,7 +443,7 @@ static PyObject *make_ob_pool(void *pool
* normally used for anything. It's just here for compatibility
* with Subversion 1.2. */
apr_pool_t *new_pool = svn_pool_create(application_pool);
- PyObject *new_py_pool = svn_swig_NewPointerObj(new_pool,
+ PyObject *new_py_pool = svn_swig_py_new_pointer_obj(new_pool,
svn_swig_TypeQuery("apr_pool_t *"), application_py_pool, NULL);
(void) pool; /* Silence compiler warnings about unused parameter. */
return new_py_pool;
@@ -534,7 +534,7 @@ static PyObject *convert_hash(apr_hash_t
static PyObject *convert_to_swigtype(void *value, void *ctx, PyObject *py_pool)
{
/* ctx is a 'swig_type_info *' */
- return svn_swig_NewPointerObj(value, ctx, py_pool, NULL);
+ return svn_swig_py_new_pointer_obj(value, ctx, py_pool, NULL);
}
static PyObject *convert_svn_string_t(void *value, void *ctx,
@@ -853,7 +853,7 @@ PyObject *svn_swig_py_convert_hash(apr_h
static PyObject *make_ob_##type(void *value) \
{ \
apr_pool_t *new_pool = svn_pool_create(application_pool); \
- PyObject *new_py_pool = svn_swig_NewPointerObj(new_pool, \
+ PyObject *new_py_pool = svn_swig_py_new_pointer_obj(new_pool, \
svn_swig_TypeQuery("apr_pool_t *"), application_py_pool, NULL); \
svn_##type##_t *new_value = dup(value, new_pool); \
PyObject *obj = svn_swig_NewPointerObjString(new_value, "svn_" #type "_t *", \
@@ -1224,7 +1224,7 @@ apr_hash_t *svn_swig_py_struct_ptr_hash_
Py_DECREF(keys);
return NULL;
}
- status = svn_swig_ConvertPtr(value, &struct_ptr, type);
+ status = svn_swig_py_convert_ptr(value, &struct_ptr, type);
if (status != 0)
{
PyErr_SetString(PyExc_TypeError,
@@ -1284,7 +1284,7 @@ svn_swig_py_unwrap_struct_ptr(PyObject *
void **ptr_dest = destination;
swig_type_info *type_descriptor = baton;
- int status = svn_swig_ConvertPtr(source, ptr_dest, type_descriptor);
+ int status = svn_swig_py_convert_ptr(source, ptr_dest, type_descriptor);
if (status != 0)
{
@@ -2223,7 +2223,7 @@ svn_swig_py_convert_txdelta_op_c_array(i
for (i = 0; i < num_ops; ++i)
PyList_SET_ITEM(result, i,
- svn_swig_NewPointerObj(ops + i, op_type_info,
+ svn_swig_py_new_pointer_obj(ops + i, op_type_info,
parent_pool, NULL));
return result;
@@ -4068,7 +4068,7 @@ static svn_error_t *reporter_abort_repor
return err;
}
-const svn_ra_reporter2_t swig_py_ra_reporter2 = {
+static const svn_ra_reporter2_t swig_py_ra_reporter2 = {
reporter_set_path,
reporter_delete_path,
reporter_link_path,
@@ -4076,6 +4076,11 @@ const svn_ra_reporter2_t swig_py_ra_repo
reporter_abort_report
};
+const svn_ra_reporter2_t *svn_swig_py_get_ra_reporter2()
+{
+ return &swig_py_ra_reporter2;
+}
+
/* svn_wc_diff_callbacks2_t */
static svn_error_t *
wc_diff_callbacks2_file_changed_or_added(const char *callback,
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h Thu Jul 25 15:29:49 2013
@@ -40,16 +40,6 @@
#include "svn_repos.h"
/* Define DLL export magic on Windows. */
-#ifdef WIN32
-# ifdef SVN_SWIG_SWIGUTIL_PY_C
-# define SVN_SWIG_SWIGUTIL_EXPORT __declspec(dllexport)
-# else
-# define SVN_SWIG_SWIGUTIL_EXPORT __declspec(dllimport)
-# endif
-#else
-# define SVN_SWIG_SWIGUTIL_EXPORT
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -57,27 +47,22 @@ extern "C" {
/* Initialize the libsvn_swig_py library. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_status_t svn_swig_py_initialize(void);
/* Functions to manage python's global interpreter lock */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_release_py_lock(void);
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_acquire_py_lock(void);
/*** Automatic Pool Management Functions ***/
/* Set the application pool */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_set_application_pool(PyObject *py_pool, apr_pool_t *pool);
/* Clear the application pool */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_clear_application_pool(void);
/* Get the pool argument from the last element of tuple args.
@@ -85,7 +70,6 @@ void svn_swig_py_clear_application_pool(
* subpool. Return 0 if successful. Return 1 if an error
* occurs.
*/
-SVN_SWIG_SWIGUTIL_EXPORT
int svn_swig_py_get_pool_arg(PyObject *args, swig_type_info *type,
PyObject **py_pool, apr_pool_t **pool);
@@ -93,7 +77,6 @@ int svn_swig_py_get_pool_arg(PyObject *a
* argument list. Return 0 if successful. Return 1 if an error
* occurs.
*/
-SVN_SWIG_SWIGUTIL_EXPORT
int svn_swig_py_get_parent_pool(PyObject *args, swig_type_info *type,
PyObject **py_pool, apr_pool_t **pool);
@@ -101,54 +84,45 @@ int svn_swig_py_get_parent_pool(PyObject
/*** SWIG Wrappers ***/
/* Wrapper for SWIG_NewPointerObj */
-SVN_SWIG_SWIGUTIL_EXPORT
-PyObject *svn_swig_NewPointerObj(void *obj, swig_type_info *type,
+PyObject *svn_swig_py_new_pointer_obj(void *obj, swig_type_info *type,
PyObject *pool, PyObject *args);
/* Wrapper for SWIG_ConvertPtr */
-SVN_SWIG_SWIGUTIL_EXPORT
-int svn_swig_ConvertPtr(PyObject *input, void **obj, swig_type_info *type);
+int svn_swig_py_convert_ptr(PyObject *input, void **obj, swig_type_info *type);
/* Wrapper for SWIG_MustGetPtr */
-SVN_SWIG_SWIGUTIL_EXPORT
-void *svn_swig_MustGetPtr(void *input, swig_type_info *type, int argnum);
+void *svn_swig_py_must_get_ptr(void *input, swig_type_info *type, int argnum);
/*** Functions to expose a custom SubversionException ***/
/* raise a subversion exception, created from a normal subversion
error. consume the error. */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_svn_exception(svn_error_t *err);
/* helper function to convert an apr_hash_t* (char* -> svnstring_t*) to
a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_prophash_to_dict(apr_hash_t *hash);
/* helper function to convert an apr_hash_t* (svn_revnum_t* -> const
char *) to a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_locationhash_to_dict(apr_hash_t *hash);
/* helper function to convert an apr_array_header_t* (of
svn_merge_range_t *) to a Python list */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_pointerlist_to_list(apr_array_header_t *list,
swig_type_info *type,
PyObject *py_pool);
/* helper function to convert an apr_hash_t* (const char *->array of
svn_merge_range_t *) to a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_mergeinfo_to_dict(apr_hash_t *hash,
swig_type_info *type,
PyObject *py_pool);
/* helper function to convert an apr_hash_t* (const char *->hash of
mergeinfo hashes) to a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_mergeinfo_catalog_to_dict(apr_hash_t *hash,
swig_type_info *type,
PyObject *py_pool);
@@ -156,90 +130,75 @@ PyObject *svn_swig_py_mergeinfo_catalog_
/* helper function to convert an apr_hash_t *(const char *->const char
*) to a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_stringhash_to_dict(apr_hash_t *hash);
/* convert a hash of 'const char *' -> TYPE into a Python dict */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_convert_hash(apr_hash_t *hash, swig_type_info *type,
PyObject *py_pool);
/* helper function to convert a 'char **' into a Python list of string
objects */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_c_strings_to_list(char **strings);
/* helper function to convert an array of 'const char *' to a Python list
of string objects */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_array_to_list(const apr_array_header_t *strings);
/* helper function to convert a hash mapping char * to
* svn_log_changed_path_t * to a Python dict mapping str to str. */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_changed_path_hash_to_dict(apr_hash_t *hash);
/* helper function to convert a hash mapping char * to
* svn_log_changed_path2_t * to a Python dict mapping str to str. */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_changed_path2_hash_to_dict(apr_hash_t *hash);
/* helper function to convert an array of 'svn_revnum_t' to a Python list
of int objects */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_revarray_to_list(const apr_array_header_t *revs);
/* helper function to convert a Python dictionary mapping strings to
strings into an apr_hash_t mapping const char *'s to const char *'s,
allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_py_stringhash_from_dict(PyObject *dict,
apr_pool_t *pool);
/* helper function to convert a Python dictionary mapping strings to
rangelists into an apr_hash_t mapping const char *'s to rangelists,
allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_py_mergeinfo_from_dict(PyObject *dict,
apr_pool_t *pool);
/* helper function to convert a Python dictionary mapping strings to
strings into an 'apr_array_header_t *' of svn_prop_t *
allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_array_header_t *svn_swig_py_proparray_from_dict(PyObject *dict,
apr_pool_t *pool);
/* helper function to convert a 'apr_array_header_t *' of 'svn_prop_t
to a Python dictionary mapping strings to strings. */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *svn_swig_py_proparray_to_dict(const apr_array_header_t *array);
/* helper function to convert a 'apr_array_header_t *' of
'svn_prop_inherited_item_t' to a Python dictionary mapping strings
to dictionary. */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *
svn_swig_py_propinheriteditemarray_to_dict(const apr_array_header_t *array);
/* helper function to convert a Python dictionary mapping strings to
strings into an apr_hash_t mapping const char *'s to svn_string_t's,
allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_py_prophash_from_dict(PyObject *dict,
apr_pool_t *pool);
/* helper function to convert a Python dictionary mapping strings to
integers into an apr_hash_t mapping const char *'s to revnums,
allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_py_path_revs_hash_from_dict(PyObject *dict,
apr_pool_t *pool);
/* helper function to convert a Python dictionary mapping strings to
SWIG wrappers described by type into an apr_hash_t mapping const char *'s to
struct pointers, allocated in POOL. */
-SVN_SWIG_SWIGUTIL_EXPORT
apr_hash_t *svn_swig_py_struct_ptr_hash_from_dict(PyObject *dict,
swig_type_info *type,
apr_pool_t *pool);
@@ -259,7 +218,6 @@ typedef int (*svn_swig_py_object_unwrap_
In case of failure, raises a Python exception, presuming that seq was the
function argument #argnum.
pool is used to allocate the array. */
-SVN_SWIG_SWIGUTIL_EXPORT
const apr_array_header_t *
svn_swig_py_seq_to_array(PyObject *seq,
int element_size,
@@ -269,7 +227,6 @@ svn_swig_py_seq_to_array(PyObject *seq,
/* An svn_swig_py_object_unwrap_t that extracts a char pointer from a Python
string. */
-SVN_SWIG_SWIGUTIL_EXPORT
int
svn_swig_py_unwrap_string(PyObject *source,
void *destination,
@@ -277,7 +234,6 @@ svn_swig_py_unwrap_string(PyObject *sour
/* An svn_swig_py_object_unwrap_t that extracts an svn_revnum_t from a Python
integer. */
-SVN_SWIG_SWIGUTIL_EXPORT
int
svn_swig_py_unwrap_revnum(PyObject *source,
void *destination,
@@ -285,30 +241,25 @@ svn_swig_py_unwrap_revnum(PyObject *sour
/* An svn_swig_py_object_unwrap_t that extracts a struct pointer from a SWIG
wrapper. baton is expected to be a swig_type_info* describing the struct. */
-SVN_SWIG_SWIGUTIL_EXPORT
int
svn_swig_py_unwrap_struct_ptr(PyObject *source,
void *destination,
void *baton);
/* make an editor that "thunks" from C callbacks up to Python */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_make_editor(const svn_delta_editor_t **editor,
void **edit_baton,
PyObject *py_editor,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
apr_file_t *svn_swig_py_make_file(PyObject *py_file,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_stream_t *svn_swig_py_make_stream(PyObject *py_io,
apr_pool_t *pool);
/* Convert ops, a C array of num_ops elements, to a Python list of SWIG
objects with descriptor op_type_info and pool set to parent_pool. */
-SVN_SWIG_SWIGUTIL_EXPORT
PyObject *
svn_swig_py_convert_txdelta_op_c_array(int num_ops,
svn_txdelta_op_t *ops,
@@ -317,7 +268,6 @@ svn_swig_py_convert_txdelta_op_c_array(i
/* a notify function that executes a Python function that is passed in
via the baton argument */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_notify_func(void *baton,
const char *path,
svn_wc_notify_action_t action,
@@ -327,21 +277,18 @@ void svn_swig_py_notify_func(void *baton
svn_wc_notify_state_t prop_state,
svn_revnum_t revision);
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_notify_func2(void *baton,
const svn_wc_notify_t *notify,
apr_pool_t *pool);
/* a status function that executes a Python function that is passed in
via the baton argument */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_status_func(void *baton,
const char *path,
svn_wc_status_t *status);
/* a svn_delta_path_driver callback that executes a Python function
that is passed in via the baton argument */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_delta_path_driver_cb_func(void **dir_baton,
void *parent_baton,
void *callback_baton,
@@ -350,24 +297,20 @@ svn_error_t *svn_swig_py_delta_path_driv
/* a status function that executes a Python function that is passed in
via the baton argument */
-SVN_SWIG_SWIGUTIL_EXPORT
void svn_swig_py_status_func2(void *baton,
const char *path,
svn_wc_status2_t *status);
/* a cancel function that executes a Python function passed in via the
cancel_baton argument. */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_cancel_func(void *cancel_baton);
/* thunked fs get_locks function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_fs_get_locks_func(void *baton,
svn_lock_t *lock,
apr_pool_t *pool);
/* thunked commit log fetcher */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_get_commit_log_func(const char **log_msg,
const char **tmp_file,
const apr_array_header_t *
@@ -376,7 +319,6 @@ svn_error_t *svn_swig_py_get_commit_log_
apr_pool_t *pool);
/* thunked repos authz callback function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_repos_authz_func(svn_boolean_t *allowed,
svn_fs_root_t *root,
const char *path,
@@ -384,14 +326,12 @@ svn_error_t *svn_swig_py_repos_authz_fun
apr_pool_t *pool);
/* thunked history callback function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_repos_history_func(void *baton,
const char *path,
svn_revnum_t revision,
apr_pool_t *pool);
/* thunked log receiver function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_log_receiver(void *py_receiver,
apr_hash_t *changed_paths,
svn_revnum_t rev,
@@ -401,23 +341,19 @@ svn_error_t *svn_swig_py_log_receiver(vo
apr_pool_t *pool);
/* thunked log receiver2 function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_log_entry_receiver(void *baton,
svn_log_entry_t *log_entry,
apr_pool_t *pool);
/* thunked repos freeze function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_repos_freeze_func(void *baton,
apr_pool_t *pool);
/* thunked fs freeze function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_fs_freeze_func(void *baton,
apr_pool_t *pool);
/* thunked proplist receiver2 function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_proplist_receiver2(void *baton,
const char *path,
apr_hash_t *prop_hash,
@@ -425,21 +361,18 @@ svn_error_t *svn_swig_py_proplist_receiv
apr_pool_t *pool);
/* thunked info receiver function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_info_receiver_func(void *py_receiver,
const char *path,
const svn_info_t *info,
apr_pool_t *pool);
/* thunked location segments receiver function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *
svn_swig_py_location_segment_receiver_func(svn_location_segment_t *segment,
void *baton,
apr_pool_t *pool);
/* thunked blame receiver function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_client_blame_receiver_func(void *baton,
apr_int64_t line_no,
svn_revnum_t revision,
@@ -449,21 +382,18 @@ svn_error_t *svn_swig_py_client_blame_re
apr_pool_t *pool);
/* thunked changelist receiver function */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_changelist_receiver_func(void *baton,
const char *path,
const char *changelist,
apr_pool_t *pool);
/* auth provider callbacks */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t * svn_swig_py_auth_gnome_keyring_unlock_prompt_func(
char **keyring_passwd,
const char *keyring_name,
void *baton,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_auth_simple_prompt_func(
svn_auth_cred_simple_t **cred,
void *baton,
@@ -472,7 +402,6 @@ svn_error_t *svn_swig_py_auth_simple_pro
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_auth_username_prompt_func(
svn_auth_cred_username_t **cred,
void *baton,
@@ -480,7 +409,6 @@ svn_error_t *svn_swig_py_auth_username_p
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_auth_ssl_server_trust_prompt_func(
svn_auth_cred_ssl_server_trust_t **cred,
void *baton,
@@ -490,7 +418,6 @@ svn_error_t *svn_swig_py_auth_ssl_server
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_auth_ssl_client_cert_prompt_func(
svn_auth_cred_ssl_client_cert_t **cred,
void *baton,
@@ -498,7 +425,6 @@ svn_error_t *svn_swig_py_auth_ssl_client
svn_boolean_t may_save,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_auth_ssl_client_cert_pw_prompt_func(
svn_auth_cred_ssl_client_cert_pw_t **cred,
void *baton,
@@ -507,7 +433,6 @@ svn_error_t *svn_swig_py_auth_ssl_client
apr_pool_t *pool);
/* auth cleanup callback */
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_config_auth_walk_func(svn_boolean_t *delete_cred,
void *walk_baton,
const char *cred_kind,
@@ -515,32 +440,27 @@ svn_error_t *svn_swig_py_config_auth_wal
apr_hash_t *hash,
apr_pool_t *scratch_pool);
-SVN_SWIG_SWIGUTIL_EXPORT
void
svn_swig_py_setup_ra_callbacks(svn_ra_callbacks2_t **callbacks,
void **baton,
PyObject *py_callbacks,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_wc_diff_callbacks2_t *
svn_swig_py_setup_wc_diff_callbacks2(void **baton,
PyObject *py_callbacks,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_commit_callback2(const svn_commit_info_t *commit_info,
void *baton,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_commit_callback(svn_revnum_t new_revision,
const char *date,
const char *author,
void *baton);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_ra_file_rev_handler_func(
void *baton,
const char *path,
@@ -551,7 +471,6 @@ svn_error_t *svn_swig_py_ra_file_rev_han
apr_array_header_t *prop_diffs,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_error_t *svn_swig_py_ra_lock_callback(
void *baton,
const char *path,
@@ -560,17 +479,14 @@ svn_error_t *svn_swig_py_ra_lock_callbac
svn_error_t *ra_err,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
-extern const svn_ra_reporter2_t swig_py_ra_reporter2;
+const svn_ra_reporter2_t *svn_swig_py_get_ra_reporter2(void);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_boolean_t
svn_swig_py_config_enumerator2(const char *name,
const char *value,
void *baton,
apr_pool_t *pool);
-SVN_SWIG_SWIGUTIL_EXPORT
svn_boolean_t
svn_swig_py_config_section_enumerator2(const char *name,
void *baton,
Modified: subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c?rev=1507012&r1=1507011&r2=1507012&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c Thu Jul 25 15:29:49 2013
@@ -23,9 +23,16 @@
/* Tell swigutil_rb.h that we're inside the implementation */
#define SVN_SWIG_SWIGUTIL_RB_C
+/* Windows hack: Allow overriding some <ruby.h> defaults */
+#include "swigutil_rb__pre_ruby.h"
#include "swig_ruby_external_runtime.swg"
#include "swigutil_rb.h"
+
+#ifdef HAVE_RUBY_ST_H
+#include <ruby/st.h>
+#else
#include <st.h>
+#endif
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
@@ -1597,7 +1604,7 @@ typedef struct callback_handle_error_bat
} callback_handle_error_baton_t;
static VALUE
-callback(VALUE baton)
+callback(VALUE baton, ...)
{
callback_baton_t *cbb = (callback_baton_t *)baton;
VALUE result;
@@ -1609,7 +1616,7 @@ callback(VALUE baton)
}
static VALUE
-callback_rescue(VALUE baton)
+callback_rescue(VALUE baton, ...)
{
callback_rescue_baton_t *rescue_baton = (callback_rescue_baton_t*)baton;
@@ -1626,7 +1633,7 @@ callback_rescue(VALUE baton)
}
static VALUE
-callback_ensure(VALUE pool)
+callback_ensure(VALUE pool, ...)
{
svn_swig_rb_pop_pool(pool);
@@ -1647,7 +1654,7 @@ invoke_callback(VALUE baton, VALUE pool)
}
static VALUE
-callback_handle_error(VALUE baton)
+callback_handle_error(VALUE baton, ...)
{
callback_handle_error_baton_t *handle_error_baton;
handle_error_baton = (callback_handle_error_baton_t *)baton;
@@ -4026,4 +4033,7 @@ static svn_ra_reporter3_t rb_ra_reporter
svn_swig_rb_ra_reporter_abort_report
};
-svn_ra_reporter3_t *svn_swig_rb_ra_reporter3 = &rb_ra_reporter3;
+svn_ra_reporter3_t *svn_swig_rb_get_ra_reporter3()
+{
+ return &rb_ra_reporter3;
+}