mirror of
				https://github.com/stedolan/jq.git
				synced 2024-05-11 05:55:39 +00:00 
			
		
		
		
	Allow C-coded functions to empty
				
					
				
			Just return a jv_invalid() without a message.
This commit is contained in:
		@@ -703,9 +703,13 @@ jv jq_next(jq_state *jq) {
 | 
			
		||||
      
 | 
			
		||||
      if (jv_is_valid(top)) {
 | 
			
		||||
        stack_push(jq, top);
 | 
			
		||||
      } else {
 | 
			
		||||
      } else if (jv_invalid_has_msg(jv_copy(top))) {
 | 
			
		||||
        set_error(jq, top);
 | 
			
		||||
        goto do_backtrack;
 | 
			
		||||
      } else {
 | 
			
		||||
        // C-coded function returns invalid w/o msg? -> backtrack, as if
 | 
			
		||||
        // it had returned `empty`
 | 
			
		||||
        goto do_backtrack;
 | 
			
		||||
      }
 | 
			
		||||
      break;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user