parsav  Diff

Differences From Artifact [5ad659a834]:

To Artifact [4782518865]:


     1      1   -- vim: ft=terra
     2      2   local m = {
     3         -	timepoint = uint64;
            3  +	timepoint = int64;
     4      4   	scope = lib.enum {
     5      5   		'public', 'private', 'local';
     6      6   		'personal', 'direct', 'circle';
     7      7   	};
     8      8   	notiftype = lib.enum {
................................................................................
    64     64   	nym: str
    65     65   	handle: str
    66     66   	origin: uint64
    67     67   	bio: str
    68     68   	avatar: str
    69         -	knownsince: int64
           69  +	knownsince: m.timepoint
    70     70   	rights: m.rights
    71     71   	key: lib.mem.ptr(uint8)
    72     72   
    73     73   -- ephemera
    74     74   	xid: str
................................................................................
    81     81   	followers: intptr
    82     82   	mutuals: intptr
    83     83   }
    84     84   
    85     85   struct m.range {
    86         -	time: bool
           86  +	mode: uint8 -- 0 == I->I, 1 == T->I, 2 == I->T, 3 == T->T
    87     87   	union {
    88     88   		from_time: m.timepoint
    89     89   		from_idx: uint64
    90     90   	}
    91     91   	union {
................................................................................
    97     97   struct m.post {
    98     98   	id: uint64
    99     99   	author: uint64
   100    100   	subject: str
   101    101   	body: str
          102  +	acl: str
   102    103   	posted: m.timepoint
   103    104   	discovered: m.timepoint
   104         -	scope: m.scope.t
   105    105   	mentions: lib.mem.ptr(uint64)
   106    106   	circles: lib.mem.ptr(uint64) --only meaningful if scope is set to circle
   107    107   	convo: uint64
   108    108   	parent: uint64
   109         -
          109  +-- ephemera
          110  +	localpost: bool
   110    111   	source: &m.source
   111    112   }
   112    113   
   113    114   local cnf = terralib.memoize(function(ty,rty)
   114    115   	rty = rty or ty
................................................................................
   209    210   			-- origin: inet
   210    211   
   211    212   	actor_conf_str: cnf(rawstring, lib.mem.ptr(int8))
   212    213   	actor_conf_int: cnf(intptr, lib.stat(intptr))
   213    214   
   214         -	post_save: {&m.source, &m.post} -> bool
   215         -	post_create: {&m.source, &m.post} -> bool
          215  +	post_save: {&m.source, &m.post} -> {}
          216  +	post_create: {&m.source, &m.post} -> uint64
   216    217   	actor_post_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(m.post)
   217    218   	convo_fetch_xid: {&m.source,rawstring} -> lib.mem.ptr(m.post)
   218    219   	convo_fetch_uid: {&m.source,uint64} -> lib.mem.ptr(m.post)
   219    220   
   220         -	actor_timeline_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(m.post)
   221         -	instance_timeline_fetch: {&m.source, m.range} -> lib.mem.ptr(m.post)
          221  +	actor_timeline_fetch_uid: {&m.source, uint64, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
          222  +	instance_timeline_fetch: {&m.source, m.range} -> lib.mem.ptr(lib.mem.ptr(m.post))
   222    223   }
   223    224   
   224    225   struct m.source {
   225    226   	backend: &m.backend
   226    227   	id: lib.mem.ptr(int8)