File: test-strcmp.js

package info (click to toggle)
seed 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,900 kB
  • sloc: ansic: 24,336; sh: 11,196; makefile: 773; xml: 187; python: 173
file content (13 lines) | stat: -rwxr-xr-x 321 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env seed
GObject = imports.gi.GObject;
ffi = imports.ffi;

var app = new ffi.Library();
var strcmp = app.strcmp;

strcmp.signature = {arguments: [GObject.TYPE_STRING, GObject.TYPE_STRING], 
		    returns: GObject.TYPE_INT};

print(strcmp("Hi", "Hi"));
print(strcmp("Boo", "Foo"));
print(strcmp("Foo", "Boo"));