static PyTypeObject CredentialsIter_Type;
static PyTypeObject Auth_Type;
-static bool ra_check_svn_path(char *path)
+static bool ra_check_svn_path(const char *path)
{
/* svn_ra_check_path will raise an assertion error if the path has a
* leading '/'. Raise a Python exception if there ar eleading '/'s so that
bool busy;
PyObject *client_string_func;
PyObject *open_tmp_file_func;
- char *root;
- char *corrected_url;
+ const char *root;
+ const char *corrected_url;
} RemoteAccessObject;
typedef struct {
RemoteAccessObject *ra = (RemoteAccessObject *)self;
svn_dirent_t *dirent;
apr_ssize_t klen;
- char *path;
+ const char *path;
PyObject *py_path;
svn_revnum_t revision = -1;
unsigned int dirent_fields = 0;
PyObject *py_dirents, *py_props;
- char *kwnames[] = { "path", "revision", "fields", NULL };
+ char *kwnames[] = { "path", "revision", "fields", NULL };
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|lI:get_dir", kwnames,
&py_path, &revision, &dirent_fields))
static PyObject *ra_get_file(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
svn_revnum_t revision = -1;
RemoteAccessObject *ra = (RemoteAccessObject *)self;
static PyObject *ra_check_path(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
RemoteAccessObject *ra = (RemoteAccessObject *)self;
svn_revnum_t revision;
svn_node_kind_t kind;
static PyObject *ra_stat(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
RemoteAccessObject *ra = (RemoteAccessObject *)self;
PyObject *ret;
static PyObject *ra_get_locks(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
apr_pool_t *temp_pool;
apr_hash_t *hash_locks;
static PyObject *ra_get_locations(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
RemoteAccessObject *ra = (RemoteAccessObject *)self;
svn_revnum_t peg_revision;
#if ONLY_SINCE_SVN(1, 5)
RemoteAccessObject *ra = (RemoteAccessObject *)self;
svn_revnum_t peg_revision, start_revision, end_revision;
- char *path;
+ const char *path;
PyObject *py_path;
PyObject *py_rcvr;
apr_pool_t *temp_pool;
char *kwnames[] = { "url", "path", "rev", "peg_rev", "recurse", "ignore_externals", "allow_unver_obstructions", NULL };
svn_revnum_t result_rev;
svn_opt_revision_t c_peg_rev, c_rev;
- char *path, *url;
+ char *path;
+ const char *url;
PyObject *py_url = NULL;
- apr_pool_t *temp_pool;
- PyObject *peg_rev=Py_None, *rev=Py_None;
- bool recurse=true, ignore_externals=false, allow_unver_obstructions=false;
+ apr_pool_t *temp_pool;
+ PyObject *peg_rev=Py_None, *rev=Py_None;
+ bool recurse=true, ignore_externals=false, allow_unver_obstructions=false;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Os|OObbb", kwnames, &py_url, &path, &rev, &peg_rev, &recurse, &ignore_externals, &allow_unver_obstructions))
return NULL;
static PyObject *py_dir_editor_delete_entry(PyObject *self, PyObject *args)
{
EditorObject *editor = (EditorObject *)self;
- char *path;
+ const char *path;
PyObject *py_path;
svn_revnum_t revision = -1;
static PyObject *py_dir_editor_add_directory(PyObject *self, PyObject *args)
{
PyObject *py_path;
- char *path;
+ const char *path;
char *copyfrom_path = NULL;
svn_revnum_t copyfrom_rev = -1;
void *child_baton;
static PyObject *py_dir_editor_open_directory(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
EditorObject *editor = (EditorObject *)self;
svn_revnum_t base_revision=-1;
static PyObject *py_dir_editor_absent_directory(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
EditorObject *editor = (EditorObject *)self;
static PyObject *py_dir_editor_add_file(PyObject *self, PyObject *args)
{
- char *path, *copy_path=NULL;
+ const char *path;
+ char *copy_path=NULL;
PyObject *py_path;
svn_revnum_t copy_rev=-1;
void *file_baton = NULL;
static PyObject *py_dir_editor_open_file(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
svn_revnum_t base_revision=-1;
void *file_baton;
static PyObject *py_dir_editor_absent_file(PyObject *self, PyObject *args)
{
- char *path;
+ const char *path;
PyObject *py_path;
EditorObject *editor = (EditorObject *)self;
static PyObject *repos_init(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
- char *path;
+ const char *path;
char *kwnames[] = { "path", NULL };
svn_error_t *err;
RepositoryObject *ret;
}
}
-char *py_object_to_svn_uri(PyObject *obj, apr_pool_t *pool)
+const char *py_object_to_svn_uri(PyObject *obj, apr_pool_t *pool)
{
const char *ret;
PyObject *bytes_obj = NULL;
}
}
-char *py_object_to_svn_relpath(PyObject *obj, apr_pool_t *pool)
+const char *py_object_to_svn_relpath(PyObject *obj, apr_pool_t *pool)
{
+ const char *ret;
PyObject *bytes_obj = NULL;
if (PyUnicode_Check(obj)) {
}
if (PyBytes_Check(obj)) {
- return svn_relpath_canonicalize(PyBytes_AsString(obj), pool);
+ ret = svn_relpath_canonicalize(PyBytes_AsString(obj), pool);
Py_XDECREF(bytes_obj);
+ return ret;
} else {
Py_XDECREF(bytes_obj);
PyErr_SetString(PyExc_TypeError,
apr_pool_t *result_pool);
#endif
-char *py_object_to_svn_uri(PyObject *obj, apr_pool_t *pool);
-char *py_object_to_svn_relpath(PyObject *obj, apr_pool_t *pool);
+const char *py_object_to_svn_uri(PyObject *obj, apr_pool_t *pool);
+const char *py_object_to_svn_relpath(PyObject *obj, apr_pool_t *pool);
char *py_object_to_svn_string(PyObject *obj, apr_pool_t *pool);
#endif /* _SUBVERTPY_UTIL_H_ */