[go: up one dir, main page]

File: memory.i

package info (click to toggle)
swig 1.1.p5-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 9,472 kB
  • ctags: 5,046
  • sloc: cpp: 21,612; ansic: 13,333; yacc: 3,297; python: 2,794; makefile: 2,220; perl: 1,997; tcl: 1,583; sh: 736; lisp: 201; objc: 143
file content (39 lines) | stat: -rw-r--r-- 1,101 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// memory.i
// Dave Beazley
// November 30, 1996
// SWIG file for memory operations
//

%module memory
%{
#include <string.h>
%}

%section "Memory Manipulation Module",after,info,nosort,pre,chop_left=3,chop_bottom=0,chop_top=0,chop_right=0,skip=1

%text %{
%include memory.i

This module provides support for a few memory operations from the C
<string.h> library.  These functions can be used to manipulate binary
data. s and t are of type void *, cs and ct are both of type const void *.
%}

void *memcpy(void *s, const void *ct, int n);
/* Copy n characters from ct to s, and return s */

void *memmove(void *s, const void *ct, int n);
/* Same as memcpy except that it works even if the objects overlap. */

int memcmp(const void *cs, const void *ct, int n);
/* Compare the first n characters of cs with ct.  Returns 0 if
   they are equal, <0 if cs < ct, and >0 if cs > ct. */

void *memchr(const void *cs, char c, int n);
/* Returns pointer to the first occurrence of character c in cs. */

void *memset(void *s, char c, int n);
/* Place character c into first n characters of s, return s */