Skip to content

Commit

Permalink
_ACQUIRE removed
Browse files Browse the repository at this point in the history
  • Loading branch information
x86-64 committed May 18, 2012
1 parent d008440 commit 8608598
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 89 deletions.
28 changes: 0 additions & 28 deletions examples/data_ref_t.conf

This file was deleted.

15 changes: 0 additions & 15 deletions src/libfrozen/core/api.c
Expand Up @@ -243,18 +243,6 @@ ssize_t action_free_from_hash(data_t *data, request_t *request){ // {{{
return data_query(data, &fargs); return data_query(data, &fargs);
} // }}} } // }}}


ssize_t action_acquire_from_fast(machine_t *machine, fastcall_acquire *fargs){ // {{{
request_t r_next[] = {
{ HK(action), DATA_PTR_ACTIONT( &fargs->header.action ) },
hash_end
};
return machine_query(machine, r_next);
} // }}}
ssize_t action_acquire_from_hash(data_t *data, request_t *request){ // {{{
fastcall_acquire fargs = { { 2, ACTION_ACQUIRE } };
return data_query(data, &fargs);
} // }}}

ssize_t action_increment_from_fast(machine_t *machine, fastcall_increment *fargs){ // {{{ ssize_t action_increment_from_fast(machine_t *machine, fastcall_increment *fargs){ // {{{
request_t r_next[] = { request_t r_next[] = {
{ HK(action), DATA_PTR_ACTIONT( &fargs->header.action ) }, { HK(action), DATA_PTR_ACTIONT( &fargs->header.action ) },
Expand Down Expand Up @@ -470,7 +458,6 @@ uintmax_t fastcall_nargs[ACTION_INVALID] = {
[ACTION_QUERY] = 3, [ACTION_QUERY] = 3,
[ACTION_CONVERT_TO] = 4, [ACTION_CONVERT_TO] = 4,
[ACTION_CONVERT_FROM] = 4, [ACTION_CONVERT_FROM] = 4,
[ACTION_ACQUIRE] = 2,


[ACTION_COMPARE] = 3, [ACTION_COMPARE] = 3,
[ACTION_ADD] = 3, [ACTION_ADD] = 3,
Expand Down Expand Up @@ -499,7 +486,6 @@ f_machine_from_fast api_machine_from_fast[ACTION_INVALID] = {
[ACTION_QUERY] = (f_machine_from_fast)&action_query_from_fast, [ACTION_QUERY] = (f_machine_from_fast)&action_query_from_fast,
[ACTION_CONVERT_TO] = (f_machine_from_fast)&action_convert_to_from_fast, [ACTION_CONVERT_TO] = (f_machine_from_fast)&action_convert_to_from_fast,
[ACTION_CONVERT_FROM] = (f_machine_from_fast)&action_convert_from_from_fast, [ACTION_CONVERT_FROM] = (f_machine_from_fast)&action_convert_from_from_fast,
[ACTION_ACQUIRE] = (f_machine_from_fast)&action_acquire_from_fast,
}; };


f_data_from_hash api_data_from_hash[ACTION_INVALID] = { f_data_from_hash api_data_from_hash[ACTION_INVALID] = {
Expand All @@ -520,6 +506,5 @@ f_data_from_hash api_data_from_hash[ACTION_INVALID] = {
[ACTION_QUERY] = (f_data_from_hash)&action_query_from_hash, [ACTION_QUERY] = (f_data_from_hash)&action_query_from_hash,
[ACTION_CONVERT_TO] = (f_data_from_hash)&action_convert_to_from_hash, [ACTION_CONVERT_TO] = (f_data_from_hash)&action_convert_to_from_hash,
[ACTION_CONVERT_FROM] = (f_data_from_hash)&action_convert_from_from_hash, [ACTION_CONVERT_FROM] = (f_data_from_hash)&action_convert_from_from_hash,
[ACTION_ACQUIRE] = (f_data_from_hash)&action_acquire_from_hash,
}; };


6 changes: 0 additions & 6 deletions src/libfrozen/core/api.h
Expand Up @@ -110,8 +110,6 @@ typedef struct fastcall_header {
/* /*
// Various // Various
ACTION(QUERY), ACTION(QUERY),
ACTION(ACQUIRE)
*/ */


// Core api set {{{ // Core api set {{{
Expand Down Expand Up @@ -468,10 +466,6 @@ typedef struct fastcall_view { // ACTION(VIEW)
} fastcall_view; } fastcall_view;
// }}} // }}}


typedef struct fastcall_acquire {
fastcall_header header;
} fastcall_acquire;

typedef struct fastcall_query { typedef struct fastcall_query {
fastcall_header header; fastcall_header header;
request_t *request; request_t *request;
Expand Down
59 changes: 28 additions & 31 deletions src/libfrozen/data/enum/action/action.h
Expand Up @@ -2,36 +2,34 @@
#ifndef ACTIONS_H #ifndef ACTIONS_H
#define ACTIONS_H #define ACTIONS_H
#define ACT ION(value) ACTION_VALUE_##value #define ACT ION(value) ACTION_VALUE_##value
#define ACTION_VALUE_ACQUIRE 0 #define ACTION_VALUE_ADD 0
#define ACTION_VALUE_ADD 1 #define ACTION_VALUE_BATCH 1
#define ACTION_VALUE_BATCH 2 #define ACTION_VALUE_COMPARE 2
#define ACTION_VALUE_COMPARE 3 #define ACTION_VALUE_CONSUME 3
#define ACTION_VALUE_CONSUME 4 #define ACTION_VALUE_CONTROL 4
#define ACTION_VALUE_CONTROL 5 #define ACTION_VALUE_CONVERT_FROM 5
#define ACTION_VALUE_CONVERT_FROM 6 #define ACTION_VALUE_CONVERT_TO 6
#define ACTION_VALUE_CONVERT_TO 7 #define ACTION_VALUE_CREATE 7
#define ACTION_VALUE_CREATE 8 #define ACTION_VALUE_DECREMENT 8
#define ACTION_VALUE_DECREMENT 9 #define ACTION_VALUE_DELETE 9
#define ACTION_VALUE_DELETE 10 #define ACTION_VALUE_DIVIDE 10
#define ACTION_VALUE_DIVIDE 11 #define ACTION_VALUE_ENUM 11
#define ACTION_VALUE_ENUM 12 #define ACTION_VALUE_FREE 12
#define ACTION_VALUE_FREE 13 #define ACTION_VALUE_INCREMENT 13
#define ACTION_VALUE_INCREMENT 14 #define ACTION_VALUE_IS_NULL 14
#define ACTION_VALUE_IS_NULL 15 #define ACTION_VALUE_LENGTH 15
#define ACTION_VALUE_LENGTH 16 #define ACTION_VALUE_LOOKUP 16
#define ACTION_VALUE_LOOKUP 17 #define ACTION_VALUE_MULTIPLY 17
#define ACTION_VALUE_MULTIPLY 18 #define ACTION_VALUE_POP 18
#define ACTION_VALUE_POP 19 #define ACTION_VALUE_PUSH 19
#define ACTION_VALUE_PUSH 20 #define ACTION_VALUE_QUERY 20
#define ACTION_VALUE_QUERY 21 #define ACTION_VALUE_READ 21
#define ACTION_VALUE_READ 22 #define ACTION_VALUE_RESIZE 22
#define ACTION_VALUE_RESIZE 23 #define ACTION_VALUE_SUB 23
#define ACTION_VALUE_SUB 24 #define ACTION_VALUE_UPDATE 24
#define ACTION_VALUE_UPDATE 25 #define ACTION_VALUE_VIEW 25
#define ACTION_VALUE_VIEW 26 #define ACTION_VALUE_WRITE 26
#define ACTION_VALUE_WRITE 27
typedef enum action_t { typedef enum action_t {
ACTION_ACQUIRE = ACTION_VALUE_ACQUIRE,
ACTION_ADD = ACTION_VALUE_ADD, ACTION_ADD = ACTION_VALUE_ADD,
ACTION_BATCH = ACTION_VALUE_BATCH, ACTION_BATCH = ACTION_VALUE_BATCH,
ACTION_COMPARE = ACTION_VALUE_COMPARE, ACTION_COMPARE = ACTION_VALUE_COMPARE,
Expand Down Expand Up @@ -59,13 +57,12 @@ typedef enum action_t {
ACTION_UPDATE = ACTION_VALUE_UPDATE, ACTION_UPDATE = ACTION_VALUE_UPDATE,
ACTION_VIEW = ACTION_VALUE_VIEW, ACTION_VIEW = ACTION_VALUE_VIEW,
ACTION_WRITE = ACTION_VALUE_WRITE, ACTION_WRITE = ACTION_VALUE_WRITE,
ACTION_INVALID = 28 ACTION_INVALID = 27
} action_t; } action_t;
#endif #endif


#ifdef ACTION_C #ifdef ACTION_C
keypair_t actions[] = { keypair_t actions[] = {
{ "ACQUIRE", ACTION_VALUE_ACQUIRE },
{ "ADD", ACTION_VALUE_ADD }, { "ADD", ACTION_VALUE_ADD },
{ "BATCH", ACTION_VALUE_BATCH }, { "BATCH", ACTION_VALUE_BATCH },
{ "COMPARE", ACTION_VALUE_COMPARE }, { "COMPARE", ACTION_VALUE_COMPARE },
Expand Down
7 changes: 0 additions & 7 deletions src/libfrozen/data/special/ref/ref_t.c
Expand Up @@ -70,12 +70,6 @@ static ssize_t data_ref_t_free(data_t *data, fastcall_free *hargs){ // {{{
ref_t_destroy(fdata); ref_t_destroy(fdata);
return 0; return 0;
} // }}} } // }}}
static ssize_t data_ref_t_acquire(data_t *data, fastcall_acquire *hargs){ // {{{
ref_t *fdata = (ref_t *)data->ptr;

ref_t_acquire(fdata);
return 0;
} // }}}
static ssize_t data_ref_t_control(data_t *data, fastcall_control *fargs){ // {{{ static ssize_t data_ref_t_control(data_t *data, fastcall_control *fargs){ // {{{
ref_t *fdata = (ref_t *)data->ptr; ref_t *fdata = (ref_t *)data->ptr;


Expand All @@ -101,7 +95,6 @@ data_proto_t ref_t_proto = {
.handlers = { .handlers = {
[ACTION_CONVERT_FROM] = (f_data_func)&data_ref_t_convert_from, [ACTION_CONVERT_FROM] = (f_data_func)&data_ref_t_convert_from,
[ACTION_FREE] = (f_data_func)&data_ref_t_free, [ACTION_FREE] = (f_data_func)&data_ref_t_free,
[ACTION_ACQUIRE] = (f_data_func)&data_ref_t_acquire,
[ACTION_CONTROL] = (f_data_func)&data_ref_t_control, [ACTION_CONTROL] = (f_data_func)&data_ref_t_control,
} }
}; };
2 changes: 0 additions & 2 deletions test/example_data_ref_t.conf.out

This file was deleted.

0 comments on commit 8608598

Please sign in to comment.