File: Libproxy.i

package info (click to toggle)
libproxy 0.4.15-5%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 960 kB
  • sloc: cpp: 3,829; ansic: 112; makefile: 78; cs: 69; python: 44; perl: 42; sh: 17; ruby: 8
file content (21 lines) | stat: -rw-r--r-- 315 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* libproxy.i */
%module Libproxy
%{
#include "../../libproxy/proxy.h"
%}

%typemap(out) char ** {
  VALUE arr = rb_ary_new2(255);
  int i;
  for (i=0; $1[i]; i++) {
    rb_ary_push(arr, rb_str_new2($1[i]));
  }
  $result = arr;
}

%typemap(freearg) char ** {
  free($source);
}

%include "../../libproxy/proxy.h"