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

[PATCH] perl bindings: Fix warnings

From: Ben Reser <ben_at_reser.org>
Date: 2003-12-26 01:14:41 CET

This patch fixes a bunch of warnings in the building of the perl
bindings. With it and the 2 previous swig bindings patches I've
submitted the perl bindings build with only two warnings per file (the
actual bindings not the support lib). One is an unused var that the
perl macros add to the init function for each module that doesn't get
used because it takes no params. Another due to not using the magic
type that SWIG provides for read only variables.

I started to take a look at tieing the perl hashes to the apr hashes.
I'm going to put off doing that because what we have now works, though
isn't necessarily the most efficent. Implementing the tie is going to
be rather time consuming and due to limited time before 1.0 I'll spend
my time on things that are broken rather than not efficient. The tie
shouldn't require interface changes that are visible to the end user.
So we should be able to implement it in a patch level release down the
road.

Because of that I wrote the typemap so $ctx->config() returns a perl
hash.

So anyway here's my Christmas present to you guys, perl bindings with
hardly any warnings on build:

[[[
Variety of warning related fixes.

* subversion/bindings/swig/svn_types.i
  Don't apply long *OUTPUT to OUTENUMs.
  For OUTENUM's make the temp var a long and typecast
    it to the enum type.
  Write our own argout for OUTENUMs
  Handle strings that need converting to char pointers and lengths.
  Usage of assignment operator instead of equality operator.
  Include svn_time.h so svn_parse_date is declared before use.

* subversion/bindings/swig/swigutil_pl.c
* subversion/bindings/swig/swigutil_pl.h
  (svn_swig_pl_to_hash,svn_swig_pl_objs_to_hash,svn_swig_pl_strings_to_hash,
   svn_swig_pl_objs_to_hash_by_name): Should not be returning a const.
  (svn_delta_make_editor): Should not be taking the editor parameter as
    a const.

* subversion/bindings/swig/svn_client.i
  typecast to (SV *) to avoid warning when calling svn_swig_pl_make_pool.
  Return a hash from the config_client_ctx_t_config_get function.
  Include svn_time.h so svn_parse_date is declared before use.

]]]

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Dec 26 01:15:19 2003

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.