Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/xnpal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.47 by aga4096, Fri Jul 15 04:47:08 2005 UTC revision 1.48 by tani, Thu Jul 21 01:47:08 2005 UTC
# Line 152  ZEND_FUNCTION(xnp_extract_public_item_id Line 152  ZEND_FUNCTION(xnp_extract_public_item_id
152  ZEND_FUNCTION(xnp_extract_nonbinder_item_id);  ZEND_FUNCTION(xnp_extract_nonbinder_item_id);
153  ZEND_FUNCTION(xnp_insert_event);  ZEND_FUNCTION(xnp_insert_event);
154  ZEND_FUNCTION(xnp_get_events);  ZEND_FUNCTION(xnp_get_events);
155    ZEND_FUNCTION(xnp_get_events_for_rss);
156  };  };
157    
158  static   unsigned char fourth_arg_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE };  static   unsigned char fourth_arg_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
# Line 258  zend_function_entry xnpalmod_functions[] Line 259  zend_function_entry xnpalmod_functions[]
259      ZEND_FE(xnp_extract_public_item_id   ,third_arg_force_ref)      ZEND_FE(xnp_extract_public_item_id   ,third_arg_force_ref)
260      ZEND_FE(xnp_extract_nonbinder_item_id,third_arg_force_ref)      ZEND_FE(xnp_extract_nonbinder_item_id,third_arg_force_ref)
261      ZEND_FE(xnp_insert_event             ,NULL)      ZEND_FE(xnp_insert_event             ,NULL)
262    <<<<<<< xnpal.cc
263        ZEND_FE(xnp_get_events               ,NULL)
264        ZEND_FE(xnp_get_events_for_rss       ,NULL)
265    =======
266      ZEND_FE(xnp_get_events               ,second_arg_force_ref)      ZEND_FE(xnp_get_events               ,second_arg_force_ref)
267    >>>>>>> 1.47
268          {NULL, NULL, NULL}          {NULL, NULL, NULL}
269  };  };
270    
# Line 3852  ZEND_FUNCTION(xnp_get_events) Line 3858  ZEND_FUNCTION(xnp_get_events)
3858          if ( result == RES_OK ){          if ( result == RES_OK ){
3859                  result = eventsToZval( events, eventsLen, zevents );                  result = eventsToZval( events, eventsLen, zevents );
3860                  delete[] events;                  delete[] events;
3861            }
3862            
3863            RETURN_LONG( result );
3864    }
3865    
3866    /**
3867     * RSS生成に必要なイベントを取得する
3868     *
3869     * int xnp_get_events_for_rss( int sid, array events, int max )
3870     * @param sid セッションID
3871     * @param events イベントの配列を受け取る変数
3872     * @param max 最大取得数
3873     * @return RES_OK
3874     *
3875     */
3876    ZEND_FUNCTION(xnp_get_events_for_rss)
3877    {
3878            zval **parameters[3];
3879            long sid;
3880            long startTime = 0;
3881            long endTime = 0;
3882            zval *zevents;
3883            result_t result = RES_ERROR;
3884            
3885            int argNum = ZEND_NUM_ARGS();
3886            if ( argNum < 3 )
3887                    WRONG_PARAM_COUNT;
3888            
3889            if(zend_get_parameters_array_ex(argNum, parameters) != SUCCESS)
3890                    WRONG_PARAM_COUNT;
3891            
3892            sid = getZvalInt( parameters[0] );
3893            zevents = *(parameters[1]);
3894            if ( Z_TYPE_P(zevents) != IS_ARRAY ){
3895                    zend_error(E_WARNING, "2nd parameter wasn't an array");
3896                    RETURN_LONG( RES_ERROR );
3897            }
3898            int max = getZvalInt( parameters[2] );
3899            
3900            event_t *events = 0;
3901            int eventsLen = 0;
3902            result = getEventsForRSS( sid, &events, &eventsLen, max );
3903            if ( result == RES_OK ){
3904                    result = eventsToZval( events, eventsLen, zevents );
3905                    delete[] events;
3906          }          }
3907                    
3908          RETURN_LONG( result );          RETURN_LONG( result );

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26