21 lines
		
	
	
		
			396 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			396 B
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
| {# SPDX-License-Identifier: GPL-2.0 #}
 | |
| 
 | |
| {% if annotate %}
 | |
| /* pointer {{ name }} */
 | |
| {% endif %}
 | |
| {% if name in public_apis %}
 | |
| bool
 | |
| {% else %}
 | |
| static bool __maybe_unused
 | |
| {% endif %}
 | |
| xdrgen_encode_{{ name }}(struct xdr_stream *xdr, const struct {{ name }} *value)
 | |
| {
 | |
| {% if annotate %}
 | |
| 	/* opted */
 | |
| {% endif %}
 | |
| 	if (!xdrgen_encode_bool(xdr, value != NULL))
 | |
| 		return false;
 | |
| 	if (!value)
 | |
| 		return true;
 | |
| 
 |