File: callback-invalid-scope.h

package info (click to toggle)
gobject-introspection 1.32.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,880 kB
  • sloc: ansic: 33,799; sh: 11,293; python: 7,284; yacc: 1,410; makefile: 400; lex: 329; perl: 254; xml: 178
file content (31 lines) | stat: -rw-r--r-- 949 bytes parent folder | download
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
#include "common.h"

/**
 * test_callback_invalid:
 * @callback: (scope invalid):
 *
 */
void test_callback_invalid(GCallback *callback, gpointer user_data);

// EXPECT:5: Warning: Test: invalid scope annotation value: 'invalid'

/**
 * test_callback_invalid2:
 * @callback: (scope):
 *
 */
void test_callback_invalid2(GCallback *callback, gpointer user_data);

// EXPECT:14: Warning: Test: scope annotation needs a value

/**
 * test_callback_invalid3:
 * @callback: (scope invalid foo):
 *
 */
void test_callback_invalid3(GCallback *callback, gpointer user_data);

// EXPECT:23: Warning: Test: scope annotation needs one value, not 2

// EXPECT:12: Warning: Test: test_callback_invalid2: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)
// EXPECT:21: Warning: Test: test_callback_invalid3: argument callback: Missing (scope) annotation for callback without GDestroyNotify (valid: call, async)