Changeset e19eb97 for perlconfig.c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1077891a
Parents:
fa4562c
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:37:51)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Add const qualifiers for char * and void *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rfa4562c re19eb97  
    1414static void owl_perl_xs_init(pTHX)
    1515{
    16   char *file = __FILE__;
     16  const char *file = __FILE__;
    1717  dXSUB_SYS;
    1818  {
     
    2626  HV *h, *stash;
    2727  SV *hr;
    28   char *type;
     28  const char *type;
    2929  char *ptr, *utype, *blessas;
    3030  int i, j;
     
    135135  HE * ent;
    136136  I32 count, len;
    137   char *key,*val;
     137  const char *key,*val;
    138138  HV * hash;
    139139  struct tm tm;
     
    197197/* Calls in a scalar context, passing it a hash reference.
    198198   If return value is non-null, caller must free. */
    199 char *owl_perlconfig_call_with_message(char *subname, owl_message *m)
     199char *owl_perlconfig_call_with_message(const char *subname, owl_message *m)
    200200{
    201201  dSP ;
     
    246246   If the return value is non-null, the caller must free it.
    247247 */
    248 char * owl_perlconfig_message_call_method(owl_message *m, char *method, int argc, char ** argv)
     248char * owl_perlconfig_message_call_method(owl_message *m, const char *method, int argc, const char ** argv)
    249249{
    250250  dSP;
     
    296296
    297297
    298 char *owl_perlconfig_initperl(char * file, int *Pargc, char ***Pargv, char *** Penv)
     298char *owl_perlconfig_initperl(const char * file, int *Pargc, char ***Pargv, char *** Penv)
    299299{
    300300  int ret;
    301301  PerlInterpreter *p;
    302302  char *err;
    303   char *args[4] = {"", "-e", "0;", NULL};
     303  const char *args[4] = {"", "-e", "0;", NULL};
    304304  AV *inc;
    305305  char *path;
     
    372372
    373373/* returns whether or not a function exists */
    374 int owl_perlconfig_is_function(char *fn) {
     374int owl_perlconfig_is_function(const char *fn) {
    375375  if (get_cv(fn, FALSE)) return(1);
    376376  else return(0);
     
    378378
    379379/* caller is responsible for freeing returned string */
    380 char *owl_perlconfig_execute(char *line)
     380char *owl_perlconfig_execute(const char *line)
    381381{
    382382  STRLEN len;
    383383  SV *response;
    384   char *preout;
     384  const char *preout;
    385385  char *out;
    386386
     
    408408}
    409409
    410 void owl_perlconfig_getmsg(owl_message *m, char *subname)
     410void owl_perlconfig_getmsg(owl_message *m, const char *subname)
    411411{
    412412  char *ptr = NULL;
     
    419419
    420420/* Called on all new messages; receivemsg is only called on incoming ones */
    421 void owl_perlconfig_newmsg(owl_message *m, char *subname)
     421void owl_perlconfig_newmsg(owl_message *m, const char *subname)
    422422{
    423423  char *ptr = NULL;
     
    429429}
    430430
    431 void owl_perlconfig_new_command(char *name)
     431void owl_perlconfig_new_command(const char *name)
    432432{
    433433  dSP;
     
    452452}
    453453
    454 char *owl_perlconfig_perlcmd(owl_cmd *cmd, int argc, char **argv)
     454char *owl_perlconfig_perlcmd(owl_cmd *cmd, int argc, const char *const *argv)
    455455{
    456456  int i, count;
Note: See TracChangeset for help on using the changeset viewer.